diff --git a/app/src/main/java/eu/faircode/email/AdapterMessage.java b/app/src/main/java/eu/faircode/email/AdapterMessage.java index 83ebcf5d14..fa19b16103 100644 --- a/app/src/main/java/eu/faircode/email/AdapterMessage.java +++ b/app/src/main/java/eu/faircode/email/AdapterMessage.java @@ -961,10 +961,12 @@ public class AdapterMessage extends RecyclerView.Adapter"; - SpannableStringBuilder builder = new SpannableStringBuilder(html); + Spanned spanned = HtmlHelper.fromHtml(html, new Html.ImageGetter() { + @Override + public Drawable getDrawable(String source) { + return HtmlHelper.decodeImage(source, message.id, show_images, tvBody); + } + }, null); + + SpannableStringBuilder builder = new SpannableStringBuilder(spanned); QuoteSpan[] quoteSpans = builder.getSpans(0, builder.length(), QuoteSpan.class); for (QuoteSpan quoteSpan : quoteSpans) { builder.setSpan( @@ -1814,21 +1832,6 @@ public class AdapterMessage extends RecyclerView.Adapter"; - - return HtmlHelper.fromHtml(html, new Html.ImageGetter() { - @Override - public Drawable getDrawable(String source) { - return HtmlHelper.decodeImage(source, message.id, show_images, tvBody); - } - }, null); - } - private class TouchHandler extends ArrowKeyMovementMethod { private TupleMessageEx message; @@ -1881,8 +1884,11 @@ public class AdapterMessage extends RecyclerView.Adapter 0) { properties.setValue("quotes", message.id, true); + boolean show_images = properties.getValue("images", message.id); + Bundle args = new Bundle(); args.putSerializable("message", message); + args.putBoolean("show_images", show_images); args.putBoolean("show_quotes", true); args.putInt("zoom", zoom); bodyTask.execute(context, owner, args, "message:body");