mirror of
https://github.com/kiwix/kiwix-android.git
synced 2025-09-22 03:54:18 -04:00
Merge pull request #1750 from kiwix/feature/macgills/1707-night-mode-7
#1707 A Problem with the Night Mode
This commit is contained in:
commit
84cb7db9f6
@ -1404,8 +1404,7 @@ public abstract class CoreMainActivity extends BaseActivity
|
|||||||
break;
|
break;
|
||||||
case REQUEST_PREFERENCES:
|
case REQUEST_PREFERENCES:
|
||||||
if (resultCode == RESULT_RESTART) {
|
if (resultCode == RESULT_RESTART) {
|
||||||
startActivity(Intents.internal(CoreMainActivity.class));
|
recreate();
|
||||||
finish();
|
|
||||||
}
|
}
|
||||||
if (resultCode == RESULT_HISTORY_CLEARED) {
|
if (resultCode == RESULT_HISTORY_CLEARED) {
|
||||||
webViewList.clear();
|
webViewList.clear();
|
||||||
|
@ -175,7 +175,6 @@ public abstract class CorePrefsFragment extends PreferenceFragment implements
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onSharedPreferenceChanged(SharedPreferences sharedPreferences, String key) {
|
public void onSharedPreferenceChanged(SharedPreferences sharedPreferences, String key) {
|
||||||
|
|
||||||
if (key.equals(PREF_ZOOM_ENABLED)) {
|
if (key.equals(PREF_ZOOM_ENABLED)) {
|
||||||
setSliderState();
|
setSliderState();
|
||||||
}
|
}
|
||||||
@ -185,6 +184,7 @@ public abstract class CorePrefsFragment extends PreferenceFragment implements
|
|||||||
}
|
}
|
||||||
if (key.equals(PREF_NIGHT_MODE)) {
|
if (key.equals(PREF_NIGHT_MODE)) {
|
||||||
sharedPreferenceUtil.updateNightMode();
|
sharedPreferenceUtil.updateNightMode();
|
||||||
|
restartActivity();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user