mirror of
https://github.com/M66B/FairEmail.git
synced 2025-01-01 04:35:57 +00:00
Prevent double load raw message
This commit is contained in:
parent
664945a5b0
commit
87edb3d17d
1 changed files with 13 additions and 11 deletions
|
@ -1985,18 +1985,20 @@ class Core {
|
||||||
for (int j = isub.length - 1; j >= 0 && state.isRunning() && state.isRecoverable(); j--)
|
for (int j = isub.length - 1; j >= 0 && state.isRunning() && state.isRecoverable(); j--)
|
||||||
try {
|
try {
|
||||||
// Some providers erroneously return old messages
|
// Some providers erroneously return old messages
|
||||||
if (full.contains(isub[j])) {
|
if (full.contains(isub[j]))
|
||||||
MessageHelper helper = new MessageHelper((MimeMessage) isub[j], context);
|
try {
|
||||||
long received = helper.getReceived();
|
Date received = isub[j].getReceivedDate();
|
||||||
boolean unseen = (sync_unseen && !isub[j].isSet(Flags.Flag.SEEN));
|
boolean unseen = (sync_unseen && !isub[j].isSet(Flags.Flag.SEEN));
|
||||||
boolean flagged = (sync_flagged && isub[j].isSet(Flags.Flag.FLAGGED));
|
boolean flagged = (sync_flagged && isub[j].isSet(Flags.Flag.FLAGGED));
|
||||||
if (received < keep_time && !unseen && !flagged) {
|
if (received != null && received.getTime() < keep_time && !unseen && !flagged) {
|
||||||
long uid = ifolder.getUID(isub[j]);
|
long uid = ifolder.getUID(isub[j]);
|
||||||
Log.i(folder.name + " Skipping old uid=" + uid + " date=" + received);
|
Log.i(folder.name + " Skipping old uid=" + uid + " date=" + received);
|
||||||
ids[from + j] = null;
|
ids[from + j] = null;
|
||||||
continue;
|
continue;
|
||||||
|
}
|
||||||
|
} catch (Throwable ex) {
|
||||||
|
Log.w(ex);
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
EntityMessage message = synchronizeMessage(
|
EntityMessage message = synchronizeMessage(
|
||||||
context,
|
context,
|
||||||
|
|
Loading…
Reference in a new issue