From 3ce83b313f769c59896d17afd5842544d66e9ede Mon Sep 17 00:00:00 2001 From: M66B Date: Sat, 8 Feb 2020 18:43:34 +0100 Subject: [PATCH] Revert "Added workaround for unsupported nested colors" This reverts commit 9ed07f1c924ce85ba225b7ba21af66169f8b218f. --- .../main/java/eu/faircode/email/HtmlHelper.java | 16 ---------------- 1 file changed, 16 deletions(-) diff --git a/app/src/main/java/eu/faircode/email/HtmlHelper.java b/app/src/main/java/eu/faircode/email/HtmlHelper.java index f34c5b9967..b4fa70fe52 100644 --- a/app/src/main/java/eu/faircode/email/HtmlHelper.java +++ b/app/src/main/java/eu/faircode/email/HtmlHelper.java @@ -371,7 +371,6 @@ public class HtmlHelper { sb.append("color:").append(c).append(";"); if (Build.VERSION.SDK_INT < Build.VERSION_CODES.N) element.attr("color", c); - element.attr("x-color", c); } break; @@ -657,21 +656,6 @@ public class HtmlHelper { for (Element div : document.select("div")) div.tagName("span"); - // Workaround: fromHtml does not support nested colors - for (Element span : document.select("span")) { - String c = span.attr("x-color"); - if (!TextUtils.isEmpty(c)) { - span.removeAttr("x-color"); - for (Element cspan : span.children().select("span")) { - String style = cspan.attr("style"); - if (TextUtils.isEmpty(style)) - cspan.attr("style", "color:" + c + ";"); - else if (!style.contains("color:")) - cspan.attr(style + "color:" + c + ";"); - } - } - } - if (Build.VERSION.SDK_INT < Build.VERSION_CODES.N) for (Element span : document.select("span")) if (!TextUtils.isEmpty(span.attr("color")))