Fixed force light background color

pull/206/head
M66B 3 years ago
parent 9d7a82e612
commit 3a4ea76b4f

@ -4,7 +4,7 @@ apply plugin: 'kotlin-android'
apply plugin: 'de.undercouch.download'
def getVersionCode = { -> return 1726 }
def getRevision = { -> "\"b\"" }
def getRevision = { -> "\"c\"" }
def getReleaseName = { -> return "\"Yaverlandia\"" }
// https://en.wikipedia.org/wiki/List_of_dinosaur_genera

@ -107,9 +107,9 @@ public class WebViewEx extends WebView implements DownloadListener, View.OnLongC
WebSettings settings = getSettings();
boolean dark = (Helper.isDarkTheme(context) && !force_light);
boolean dark = Helper.isDarkTheme(context);
if (WebViewEx.isFeatureSupported(WebViewFeature.FORCE_DARK))
WebSettingsCompat.setForceDark(settings, dark ? FORCE_DARK_ON : FORCE_DARK_OFF);
WebSettingsCompat.setForceDark(settings, dark && !force_light ? FORCE_DARK_ON : FORCE_DARK_OFF);
if (!dark)
setBackgroundColor(ColorUtils.setAlphaComponent(Color.WHITE, 127));

Loading…
Cancel
Save