|
|
|
@ -2244,9 +2244,12 @@ class Core {
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
int expunge = 0;
|
|
|
|
|
for (int i = 0; i < imessages.length && state.isRunning() && state.isRecoverable(); i++)
|
|
|
|
|
try {
|
|
|
|
|
if (!imessages[i].isSet(Flags.Flag.DELETED))
|
|
|
|
|
if (imessages[i].isSet(Flags.Flag.DELETED))
|
|
|
|
|
expunge++;
|
|
|
|
|
else
|
|
|
|
|
uids.remove(ifolder.getUID(imessages[i]));
|
|
|
|
|
} catch (MessageRemovedException ex) {
|
|
|
|
|
Log.w(folder.name, ex);
|
|
|
|
@ -2256,6 +2259,14 @@ class Core {
|
|
|
|
|
db.folder().setFolderError(folder.id, Log.formatThrowable(ex));
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if (expunge > 0)
|
|
|
|
|
try {
|
|
|
|
|
Log.i(folder.name + " expunging=" + expunge);
|
|
|
|
|
ifolder.expunge();
|
|
|
|
|
} catch (Throwable ex) {
|
|
|
|
|
Log.w(ex);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if (uids.size() > 0) {
|
|
|
|
|
// This is done outside of JavaMail to prevent changed notifications
|
|
|
|
|
if (!ifolder.isOpen())
|
|
|
|
|