From 3eeb31b76ea3f5cf980439cdedc0a233577bcb34 Mon Sep 17 00:00:00 2001 From: M66B Date: Mon, 13 Jun 2022 11:37:02 +0200 Subject: [PATCH] Removed legacy web view option --- app/src/main/java/eu/faircode/email/FragmentOptionsMisc.java | 1 + app/src/main/java/eu/faircode/email/WebViewEx.java | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/app/src/main/java/eu/faircode/email/FragmentOptionsMisc.java b/app/src/main/java/eu/faircode/email/FragmentOptionsMisc.java index 02f3f21ba5..ab7bfe85cf 100644 --- a/app/src/main/java/eu/faircode/email/FragmentOptionsMisc.java +++ b/app/src/main/java/eu/faircode/email/FragmentOptionsMisc.java @@ -1022,6 +1022,7 @@ public class FragmentOptionsMisc extends FragmentBase implements SharedPreferenc } }); + swWebViewLegacy.setVisibility(BuildConfig.DEBUG ? View.VISIBLE : View.GONE); swWebViewLegacy.setOnCheckedChangeListener(new CompoundButton.OnCheckedChangeListener() { @Override public void onCheckedChanged(CompoundButton compoundButton, boolean checked) { diff --git a/app/src/main/java/eu/faircode/email/WebViewEx.java b/app/src/main/java/eu/faircode/email/WebViewEx.java index c5a84fd6ac..fcd6500d17 100644 --- a/app/src/main/java/eu/faircode/email/WebViewEx.java +++ b/app/src/main/java/eu/faircode/email/WebViewEx.java @@ -107,10 +107,10 @@ public class WebViewEx extends WebView implements DownloadListener, View.OnLongC SharedPreferences prefs = PreferenceManager.getDefaultSharedPreferences(context); boolean compact = prefs.getBoolean("compact", false); int zoom = prefs.getInt("view_zoom", compact ? 0 : 1); - boolean browser_zoom = prefs.getBoolean("browser_zoom", false) && BuildConfig.DEBUG; + boolean browser_zoom = (prefs.getBoolean("browser_zoom", false) && BuildConfig.DEBUG); int message_zoom = prefs.getInt("message_zoom", 100); boolean monospaced = prefs.getBoolean("monospaced", false); - legacy = prefs.getBoolean("webview_legacy", false); + legacy = (prefs.getBoolean("webview_legacy", false) && BuildConfig.DEBUG); WebSettings settings = getSettings();