From 75b86d818348981ec0d248c8a56de4a8eec7d131 Mon Sep 17 00:00:00 2001 From: M66B Date: Wed, 19 Jan 2022 18:02:09 +0100 Subject: [PATCH] Fixed quote style --- app/src/main/java/eu/faircode/email/HtmlHelper.java | 5 +++-- 1 file changed, 3 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 38cf0e46ec..74a20122b4 100644 --- a/app/src/main/java/eu/faircode/email/HtmlHelper.java +++ b/app/src/main/java/eu/faircode/email/HtmlHelper.java @@ -2209,15 +2209,16 @@ public class HtmlHelper { } static String getQuoteStyle(CharSequence quoted, int start, int end) { + String dir = "left"; try { int count = end - start; if (TextDirectionHeuristics.FIRSTSTRONG_LTR.isRtl(quoted, start, count)) - return "border-right:3px solid #ccc; padding-left:3px;"; + dir = "right"; } catch (Throwable ex) { Log.e(new Throwable("getQuoteStyle " + start + "..." + end, ex)); } - return "border-left:3px solid #ccc; padding-left:3px;"; + return "border-" + dir + ":3px solid #ccc; padding-" + dir + ":3px;margin-top:0; margin-bottom:0;"; } static boolean hasBorder(Element e) {