Added POP3 trash folder

This commit is contained in:
M66B
2020-04-05 21:35:56 +02:00
parent ed40991e3c
commit b637453ca7
6 changed files with 63 additions and 22 deletions

View File

@@ -454,6 +454,21 @@ public class FragmentPop extends FragmentBase {
sent.id = db.folder().insertFolder(sent);
}
EntityFolder trash = db.folder().getFolderByType(account.id, EntityFolder.TRASH);
if (trash == null) {
trash = new EntityFolder();
trash.account = account.id;
trash.name = context.getString(R.string.title_folder_trash);
trash.type = EntityFolder.TRASH;
trash.synchronize = false;
trash.unified = false;
trash.notify = false;
trash.sync_days = Integer.MAX_VALUE;
trash.keep_days = Integer.MAX_VALUE;
trash.initialize = 0;
trash.id = db.folder().insertFolder(trash);
}
db.setTransactionSuccessful();
} finally {
db.endTransaction();