From 23eb8b1c977ce4eed3a46ea8311f960621bb65b2 Mon Sep 17 00:00:00 2001 From: M66B Date: Sun, 28 Jun 2020 22:31:51 +0200 Subject: [PATCH] Simplification --- app/src/main/java/eu/faircode/email/HtmlHelper.java | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-) diff --git a/app/src/main/java/eu/faircode/email/HtmlHelper.java b/app/src/main/java/eu/faircode/email/HtmlHelper.java index c21bc199e6..ad813409a1 100644 --- a/app/src/main/java/eu/faircode/email/HtmlHelper.java +++ b/app/src/main/java/eu/faircode/email/HtmlHelper.java @@ -2230,15 +2230,7 @@ public class HtmlHelper { static Spanned fromHtml(@NonNull String html, boolean compress, @Nullable Html.ImageGetter imageGetter, @Nullable Html.TagHandler tagHandler, Context context) { Document document = JsoupEx.parse(html); - Spanned spanned = fromDocument(context, document, false, compress, imageGetter, tagHandler); - - int i = spanned.length(); - while (i > 1 && spanned.charAt(i - 2) == '\n' && spanned.charAt(i - 1) == '\n') - i--; - if (i != spanned.length()) - spanned = (Spanned) spanned.subSequence(0, i); - - return spanned; + return fromDocument(context, document, false, compress, imageGetter, tagHandler); } static String toHtml(Spanned spanned, Context context) {