mirror of
https://github.com/kiwix/kiwix-android.git
synced 2025-09-24 05:04:50 -04:00
Merge pull request #1626 from kiwix/feature/macgills/1625-dark-mode-webview
#1625 Night mode does not always apply properly on pictures - update …
This commit is contained in:
commit
b160b4ff71
@ -1242,6 +1242,7 @@ public abstract class CoreMainActivity extends BaseActivity
|
||||
}
|
||||
}
|
||||
updateWidgets(this);
|
||||
updateNightMode();
|
||||
}
|
||||
|
||||
private void updateBottomToolbarVisibility() {
|
||||
@ -1505,8 +1506,10 @@ public abstract class CoreMainActivity extends BaseActivity
|
||||
if (isInFullScreenMode()) {
|
||||
openFullScreen();
|
||||
}
|
||||
updateNightMode();
|
||||
}
|
||||
|
||||
// Night mode status
|
||||
private void updateNightMode() {
|
||||
if (nightModeConfig.isNightModeActive()) {
|
||||
getCurrentWebView().activateNightMode();
|
||||
} else {
|
||||
|
@ -107,7 +107,7 @@ public class KiwixWebView extends VideoEnabledWebView {
|
||||
}
|
||||
|
||||
public void activateNightMode() {
|
||||
if (getUrl().equals(HOME_URL)) {
|
||||
if (getUrl() != null && getUrl().equals(HOME_URL)) {
|
||||
return;
|
||||
}
|
||||
Paint paint = new Paint();
|
||||
|
Loading…
x
Reference in New Issue
Block a user