Skip synchronizing erroneously return old messages

pull/159/head
M66B 6 years ago
parent df706f36ec
commit 44a8381290

@ -1213,6 +1213,19 @@ class Core {
for (int j = isub.length - 1; j >= 0 && state.running() && state.recoverable(); j--) for (int j = isub.length - 1; j >= 0 && state.running() && state.recoverable(); j--)
try { 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( EntityMessage message = synchronizeMessage(
context, context,
account, folder, account, folder,

Loading…
Cancel
Save