1
0
Fork 0
mirror of https://github.com/M66B/FairEmail.git synced 2025-01-01 12:44:42 +00:00

Simplification

This commit is contained in:
M66B 2020-06-28 22:31:51 +02:00
parent 14c533d95f
commit 23eb8b1c97

View file

@ -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) {