From 23e88797ab8d92f0520e05a352b6bce116e14db8 Mon Sep 17 00:00:00 2001 From: M66B Date: Mon, 29 Jun 2020 14:07:57 +0200 Subject: [PATCH] Strip size, color and font when viewing only --- app/src/main/java/eu/faircode/email/HtmlHelper.java | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/app/src/main/java/eu/faircode/email/HtmlHelper.java b/app/src/main/java/eu/faircode/email/HtmlHelper.java index e12aab9fce..1357759fbd 100644 --- a/app/src/main/java/eu/faircode/email/HtmlHelper.java +++ b/app/src/main/java/eu/faircode/email/HtmlHelper.java @@ -316,9 +316,9 @@ public class HtmlHelper { private static Document sanitize(Context context, Document parsed, boolean view, boolean show_images) { SharedPreferences prefs = PreferenceManager.getDefaultSharedPreferences(context); - boolean text_color = prefs.getBoolean("text_color", true); - boolean text_size = prefs.getBoolean("text_size", true); - boolean text_font = prefs.getBoolean("text_font", true); + boolean text_color = (!view || prefs.getBoolean("text_color", true)); + boolean text_size = (!view || prefs.getBoolean("text_size", true)); + boolean text_font = (!view || prefs.getBoolean("text_font", true)); boolean text_align = prefs.getBoolean("text_align", true); boolean display_hidden = prefs.getBoolean("display_hidden", false); boolean disable_tracking = prefs.getBoolean("disable_tracking", true);