diff --git a/app/src/main/java/eu/faircode/email/EntityMessage.java b/app/src/main/java/eu/faircode/email/EntityMessage.java index 4727ead162..a18fbf11d8 100644 --- a/app/src/main/java/eu/faircode/email/EntityMessage.java +++ b/app/src/main/java/eu/faircode/email/EntityMessage.java @@ -202,6 +202,8 @@ public class EntityMessage implements Serializable { void getAvatar(Context context) { if (ContextCompat.checkSelfPermission(context, Manifest.permission.READ_CONTACTS) == PackageManager.PERMISSION_GRANTED) { + this.avatar = null; + try { if (this.from != null) for (int i = 0; i < this.from.length; i++) { diff --git a/app/src/main/java/eu/faircode/email/ServiceSynchronize.java b/app/src/main/java/eu/faircode/email/ServiceSynchronize.java index c5602227ee..4e53370b1b 100644 --- a/app/src/main/java/eu/faircode/email/ServiceSynchronize.java +++ b/app/src/main/java/eu/faircode/email/ServiceSynchronize.java @@ -2167,11 +2167,10 @@ public class ServiceSynchronize extends LifecycleService { Log.i(Helper.TAG, folder.name + " updated id=" + message.id + " uid=" + message.uid + " unhide"); } - if (TextUtils.isEmpty(message.avatar)) { - message.getAvatar(context); - if (!TextUtils.isEmpty(message.avatar)) - update = true; - } + boolean noavatar = TextUtils.isEmpty(message.avatar); + message.getAvatar(context); + if (noavatar != TextUtils.isEmpty(message.avatar)) + update = true; if (update) db.message().updateMessage(message);