From 31716d8221362f99fbf0f2e3713e9f78ec25ffec Mon Sep 17 00:00:00 2001 From: M66B Date: Sat, 18 Sep 2021 07:21:48 +0200 Subject: [PATCH] Fixed original view background color --- app/src/main/java/eu/faircode/email/WebViewEx.java | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/app/src/main/java/eu/faircode/email/WebViewEx.java b/app/src/main/java/eu/faircode/email/WebViewEx.java index 3ea42e26f4..9e7f2e1687 100644 --- a/app/src/main/java/eu/faircode/email/WebViewEx.java +++ b/app/src/main/java/eu/faircode/email/WebViewEx.java @@ -109,17 +109,13 @@ public class WebViewEx extends WebView implements DownloadListener, View.OnLongC WebSettings settings = getSettings(); - boolean forced = false; boolean dark = Helper.isDarkTheme(context); if (html_dark && - WebViewEx.isFeatureSupported(WebViewFeature.FORCE_DARK)) { + WebViewEx.isFeatureSupported(WebViewFeature.FORCE_DARK)) WebSettingsCompat.setForceDark(settings, dark ? FORCE_DARK_ON : FORCE_DARK_OFF); - forced = true; - } - setBackgroundColor(dark && !forced - ? Color.WHITE - : ColorUtils.setAlphaComponent(Color.WHITE, 127)); + if (!dark) + setBackgroundColor(ColorUtils.setAlphaComponent(Color.WHITE, 127)); float fontSize = 16f /* Default */ * message_zoom / 100f; if (zoom == 0 /* small */)