From a95b13eeac1a7b143caabede5986ceda30d36d5b Mon Sep 17 00:00:00 2001 From: M66B Date: Wed, 29 Apr 2020 21:14:18 +0200 Subject: [PATCH] Revert "Simplification" This reverts commit 9a178b2565dfe0a171967d2a15256c7da7bf98f1. --- app/src/main/java/eu/faircode/email/ImageHelper.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/app/src/main/java/eu/faircode/email/ImageHelper.java b/app/src/main/java/eu/faircode/email/ImageHelper.java index fe68701ed5..15c551b991 100644 --- a/app/src/main/java/eu/faircode/email/ImageHelper.java +++ b/app/src/main/java/eu/faircode/email/ImageHelper.java @@ -42,6 +42,7 @@ import android.net.Network; import android.net.NetworkCapabilities; import android.net.Uri; import android.os.Build; +import android.os.Handler; import android.text.TextUtils; import android.util.Base64; import android.util.DisplayMetrics; @@ -417,7 +418,7 @@ class ImageHelper { private void post(final Drawable d, String source) { Log.i("Posting image=" + source); - view.post(new Runnable() { + new Handler(context.getMainLooper()).post(new Runnable() { @Override public void run() { Rect bounds = d.getBounds(); @@ -427,6 +428,7 @@ class ImageHelper { lld.setLevel(0); view.requestLayout(); + view.invalidate(); } }); }