Added add/found old resolution

This commit is contained in:
M66B 2021-05-31 14:53:29 +02:00
parent 4de4f64972
commit 80aa2e7262
1 changed files with 12 additions and 0 deletions

View File

@ -1088,6 +1088,18 @@ class Core {
newuid = found;
else if (!newuid.equals(found)) {
Log.w(folder.name + " Added=" + newuid + " found=" + found);
try {
Message iprev = ifolder.getMessageByUID(Math.min(newuid, found));
if (iprev != null) {
iprev.setFlag(Flags.Flag.DELETED, true);
SharedPreferences prefs = PreferenceManager.getDefaultSharedPreferences(context);
boolean perform_expunge = prefs.getBoolean("perform_expunge", true);
if (perform_expunge)
ifolder.expunge();
}
} catch (MessagingException ex) {
Log.w(ex);
}
newuid = Math.max(newuid, found);
}
} catch (MessagingException ex) {