From 16956571a5b6fc2ae7e78c75d873dbf9d1cccdbd Mon Sep 17 00:00:00 2001 From: M66B Date: Mon, 4 Apr 2022 20:25:13 +0200 Subject: [PATCH] Remove fg/bg colors visibility=hidden --- app/src/main/java/eu/faircode/email/HtmlHelper.java | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/app/src/main/java/eu/faircode/email/HtmlHelper.java b/app/src/main/java/eu/faircode/email/HtmlHelper.java index 535dd2056a..38a8962adb 100644 --- a/app/src/main/java/eu/faircode/email/HtmlHelper.java +++ b/app/src/main/java/eu/faircode/email/HtmlHelper.java @@ -3208,8 +3208,13 @@ public class HtmlHelper { setSpan(ssb, new AlignmentSpan.Standard(alignment), start, ssb.length()); break; case "visibility": - if ("hidden".equals(value)) + if ("hidden".equals(value)) { + for (ForegroundColorSpan span : ssb.getSpans(start, ssb.length(), ForegroundColorSpan.class)) + ssb.removeSpan(span); + for (BackgroundColorSpan span : ssb.getSpans(start, ssb.length(), BackgroundColorSpan.class)) + ssb.removeSpan(span); setSpan(ssb, new ForegroundColorSpan(Color.TRANSPARENT), start, ssb.length()); + } break; } }