From c8ff81943fc07def36609af8647c7047632bd99f Mon Sep 17 00:00:00 2001 From: M66B Date: Thu, 8 Jul 2021 08:18:35 +0200 Subject: [PATCH] Refactoring --- app/src/main/java/eu/faircode/email/HtmlHelper.java | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/app/src/main/java/eu/faircode/email/HtmlHelper.java b/app/src/main/java/eu/faircode/email/HtmlHelper.java index 8fcbfb7a76..3f271355d0 100644 --- a/app/src/main/java/eu/faircode/email/HtmlHelper.java +++ b/app/src/main/java/eu/faircode/email/HtmlHelper.java @@ -2745,11 +2745,13 @@ public class HtmlHelper { level--; if (type == null || "ul".equals(type.tagName())) { + Object ul; String ltype = element.attr("x-list-style"); if (Build.VERSION.SDK_INT < Build.VERSION_CODES.P) - setSpan(ssb, new BulletSpanEx(bulletIndent, bulletGap, colorAccent, level, ltype), start, ssb.length()); + ul = new BulletSpanEx(bulletIndent, bulletGap, colorAccent, level, ltype); else - setSpan(ssb, new BulletSpanEx(bulletIndent, bulletGap, colorAccent, bulletRadius, level, ltype), start, ssb.length()); + ul = new BulletSpanEx(bulletIndent, bulletGap, colorAccent, bulletRadius, level, ltype); + setSpan(ssb, ul, start, ssb.length()); } else { // https://developer.mozilla.org/en-US/docs/Web/HTML/Element/ol int index = 0;