From ee2be885fcc81b919c1e55d0ee106942ba48a62e Mon Sep 17 00:00:00 2001 From: M66B Date: Wed, 29 May 2024 15:47:19 +0200 Subject: [PATCH] Ensure line break before line --- app/src/main/java/eu/faircode/email/HtmlHelper.java | 2 ++ 1 file changed, 2 insertions(+) diff --git a/app/src/main/java/eu/faircode/email/HtmlHelper.java b/app/src/main/java/eu/faircode/email/HtmlHelper.java index 9daf7a62ab..7fae811d3e 100644 --- a/app/src/main/java/eu/faircode/email/HtmlHelper.java +++ b/app/src/main/java/eu/faircode/email/HtmlHelper.java @@ -3808,6 +3808,8 @@ public class HtmlHelper { boolean dashed = "true".equals(element.attr("x-dashed")); float stroke = context.getResources().getDisplayMetrics().density; float dash = (dashed ? line_dash_length : 0f); + if (ssb.length() > 0 && ssb.charAt(ssb.length() - 1) != '\n') + ssb.append('\n'); ssb.append("\uFFFC"); // Object replacement character setSpan(ssb, new LineSpan(colorSeparator, stroke, dash), start, ssb.length()); break;