|
|
|
@ -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,
|
|
|
|
|