From 9da5692d5576b520fec9623af608dc1fb2df17e3 Mon Sep 17 00:00:00 2001 From: M66B Date: Fri, 9 Jul 2021 09:36:11 +0200 Subject: [PATCH] Suppress bullet/none in plain text --- .../main/java/eu/faircode/email/BulletSpanEx.java | 4 ++++ app/src/main/java/eu/faircode/email/HtmlHelper.java | 12 ++++++++---- 2 files changed, 12 insertions(+), 4 deletions(-) diff --git a/app/src/main/java/eu/faircode/email/BulletSpanEx.java b/app/src/main/java/eu/faircode/email/BulletSpanEx.java index ef4699f762..c6321c5548 100644 --- a/app/src/main/java/eu/faircode/email/BulletSpanEx.java +++ b/app/src/main/java/eu/faircode/email/BulletSpanEx.java @@ -67,6 +67,10 @@ public class BulletSpanEx extends BulletSpan { this.level = level; } + String getLType() { + return this.ltype; + } + @Override public int getLeadingMargin(boolean first) { // https://issuetracker.google.com/issues/36956124 diff --git a/app/src/main/java/eu/faircode/email/HtmlHelper.java b/app/src/main/java/eu/faircode/email/HtmlHelper.java index 0d90022504..2dd6919e3d 100644 --- a/app/src/main/java/eu/faircode/email/HtmlHelper.java +++ b/app/src/main/java/eu/faircode/email/HtmlHelper.java @@ -2164,15 +2164,19 @@ public class HtmlHelper { ssb.insert(start, ns.getIndex() + ". "); int level = ns.getLevel(); for (int l = 1; l <= level; l++) - ssb.insert(start, "\t"); + ssb.insert(start, " "); } else { - ssb.insert(start, "* "); if (span instanceof BulletSpanEx) { BulletSpanEx bs = (BulletSpanEx) span; + + if (!"none".equals(bs.getLType())) + ssb.insert(start, "* "); + int level = bs.getLevel(); for (int l = 1; l <= level; l++) - ssb.insert(start, "\t"); - } + ssb.insert(start, " "); + } else + ssb.insert(start, "* "); } }