diff --git a/app/src/main/java/eu/faircode/email/Core.java b/app/src/main/java/eu/faircode/email/Core.java index 64866b6770..4f81ab6ec0 100644 --- a/app/src/main/java/eu/faircode/email/Core.java +++ b/app/src/main/java/eu/faircode/email/Core.java @@ -2743,8 +2743,9 @@ class Core { Log.i(folder.name + " remote count=" + imessages.length + " search=" + stats.search_ms + " ms"); ids = new Long[imessages.length]; - if (!modified && !(sync_quick_imap && !force)) { - Log.i(folder.name + " quick check count=" + imessages.length); + + if (!modified) { + Log.i(folder.name + " quick check"); long fetch = SystemClock.elapsedRealtime(); FetchProfile fp = new FetchProfile(); @@ -3077,6 +3078,12 @@ class Core { } } } + + // Delete not synchronized messages without uid + if (!EntityFolder.isOutgoing(folder.type)) { + int orphans = db.message().deleteOrphans(folder.id, new Date().getTime()); + Log.i(folder.name + " deleted orphans=" + orphans); + } } else { List _imessages = new ArrayList<>(); List _ids = new ArrayList<>(); @@ -3100,12 +3107,6 @@ class Core { ids = _ids.toArray(new Long[0]); } - // Delete not synchronized messages without uid - if (!EntityFolder.isOutgoing(folder.type)) { - int orphans = db.message().deleteOrphans(folder.id, new Date().getTime()); - Log.i(folder.name + " deleted orphans=" + orphans); - } - // Update modseq folder.modseq = modseq; db.folder().setFolderModSeq(folder.id, folder.modseq);