mirror of
https://github.com/M66B/FairEmail.git
synced 2026-01-05 20:34:49 +01:00
Skip synchronizing erroneously return old messages
This commit is contained in:
@@ -1213,6 +1213,19 @@ class Core {
|
||||
|
||||
for (int j = isub.length - 1; j >= 0 && state.running() && state.recoverable(); j--)
|
||||
try {
|
||||
// Some providers, like Zoho, erroneously return old messages
|
||||
if (full.contains(isub[j])) {
|
||||
Date received = isub[j].getReceivedDate();
|
||||
boolean unseen = (sync_unseen && !isub[j].isSet(Flags.Flag.SEEN));
|
||||
boolean flagged = (sync_flagged && isub[j].isSet(Flags.Flag.FLAGGED));
|
||||
if (received != null && received.getTime() < sync_time && !unseen && !flagged) {
|
||||
long uid = ifolder.getUID(isub[j]);
|
||||
Log.i(folder.name + " Skipping old uid=" + uid + " date=" + received);
|
||||
ids[from + j] = null;
|
||||
continue;
|
||||
}
|
||||
}
|
||||
|
||||
EntityMessage message = synchronizeMessage(
|
||||
context,
|
||||
account, folder,
|
||||
|
||||
Reference in New Issue
Block a user