mirror of https://github.com/M66B/FairEmail.git
Small optimization
This commit is contained in:
parent
a593188019
commit
c22bf91210
|
@ -558,16 +558,19 @@ class Core {
|
|||
}
|
||||
|
||||
if (uid != null && purge) {
|
||||
boolean purged = false;
|
||||
for (Message iexisting : imessages) {
|
||||
long muid = ifolder.getUID(iexisting);
|
||||
if (muid != uid)
|
||||
try {
|
||||
Log.i(name + " deleting uid=" + muid + " for msgid=" + msgid);
|
||||
iexisting.setFlag(Flags.Flag.DELETED, true);
|
||||
purged = true;
|
||||
} catch (MessageRemovedException ignored) {
|
||||
Log.w(name + " existing gone uid=" + muid + " for msgid=" + msgid);
|
||||
}
|
||||
}
|
||||
if (purged)
|
||||
ifolder.expunge();
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue