Added POP3 option to actively delete messages after downloading

This commit is contained in:
M66B
2023-03-06 17:44:10 +01:00
parent b1afe46468
commit 0f68c1ae13
8 changed files with 2956 additions and 3 deletions

View File

@@ -2317,7 +2317,10 @@ public class ServiceSynchronize extends ServiceBase implements SharedPreferences
if (ifolder != null && ifolder.isOpen()) {
db.folder().setFolderState(folder.id, "closing");
try {
ifolder.close(false);
boolean expunge =
(account.protocol == EntityAccount.TYPE_POP &&
!account.leave_on_server && account.client_delete);
ifolder.close(expunge);
} catch (Throwable ex) {
Log.w(folder.name, ex);
}