From ca884e520f7f5b38b037becea1e198f4eb094ded Mon Sep 17 00:00:00 2001 From: M66B Date: Mon, 28 Sep 2020 18:42:26 +0200 Subject: [PATCH] Fetch all exists messages --- app/src/main/java/eu/faircode/email/Core.java | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/app/src/main/java/eu/faircode/email/Core.java b/app/src/main/java/eu/faircode/email/Core.java index 00ae1e77c1..85d1b513a2 100644 --- a/app/src/main/java/eu/faircode/email/Core.java +++ b/app/src/main/java/eu/faircode/email/Core.java @@ -1476,8 +1476,12 @@ class Core { if (imessages == null || imessages.length == 0) EntityOperation.queue(context, message, EntityOperation.ADD); else { - long uid = ifolder.getUID(imessages[0]); - EntityOperation.queue(context, folder, EntityOperation.FETCH, uid); + if (imessages.length > 1) + Log.w(folder.name + " exists messages=" + imessages.length); + for (int i = 0; i < imessages.length; i++) { + long uid = ifolder.getUID(imessages[i]); + EntityOperation.queue(context, folder, EntityOperation.FETCH, uid); + } } }