Simplifiy condition for turning on dark mode

This commit is contained in:
Yash Khare 2020-04-02 15:54:35 +05:30
parent d0d0104a84
commit a9943a7ab6

View File

@ -1549,12 +1549,8 @@ public abstract class CoreMainActivity extends BaseActivity
}
private void updateNightMode() {
painter.update(getCurrentWebView(), kiwixWebView -> {
if (kiwixWebView.getUrl() != null) {
return !kiwixWebView.getUrl().equals(HOME_URL);
}
return true;
}, videoView);
painter.update(getCurrentWebView(), kiwixWebView -> kiwixWebView.getUrl() == null
|| !kiwixWebView.getUrl().equals(HOME_URL), videoView);
}
private void loadPrefs() {