From e0c7abdad49d04c5fb3a4555fafe193cdbb3b09c Mon Sep 17 00:00:00 2001 From: M66B Date: Tue, 8 Oct 2019 12:25:09 +0200 Subject: [PATCH] Workaround server bug mail.de --- app/src/main/java/eu/faircode/email/Core.java | 6 ++++-- 1 file changed, 4 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 dc5ec6c30a..c4d2c70062 100644 --- a/app/src/main/java/eu/faircode/email/Core.java +++ b/app/src/main/java/eu/faircode/email/Core.java @@ -734,8 +734,10 @@ class Core { } if (folder.id.equals(message.folder)) { - message.uid = findUid(ifolder, message.msgid, true); - if (message.uid != null) { + // Some providers do not list the new message yet + Long newuid = findUid(ifolder, message.msgid, true); + if (message.uid != null && newuid != null && newuid > message.uid) { + message.uid = newuid; Log.i(folder.name + " appended uid=" + message.uid); db.message().setMessageUid(message.id, message.uid);