diff --git a/app/core/src/main/java/com/fsck/k9/mailstore/K9BackendStorage.kt b/app/core/src/main/java/com/fsck/k9/mailstore/K9BackendStorage.kt index ff0863054..4cbb0a07c 100644 --- a/app/core/src/main/java/com/fsck/k9/mailstore/K9BackendStorage.kt +++ b/app/core/src/main/java/com/fsck/k9/mailstore/K9BackendStorage.kt @@ -49,7 +49,10 @@ class K9BackendStorage( folderServerIds.asSequence() .filterNot { account.isSpecialFolder(it) } .map { localStore.getFolder(it) } - .forEach { it.delete() } + .forEach { + it.delete() + it.delete(true) + } specialFolderUpdater.updateSpecialFolders() } diff --git a/app/core/src/main/java/com/fsck/k9/mailstore/LocalFolder.java b/app/core/src/main/java/com/fsck/k9/mailstore/LocalFolder.java index a43dfb713..17b5b5502 100644 --- a/app/core/src/main/java/com/fsck/k9/mailstore/LocalFolder.java +++ b/app/core/src/main/java/com/fsck/k9/mailstore/LocalFolder.java @@ -1906,7 +1906,7 @@ public class LocalFolder extends Folder { @Override public Void doDbWork(final SQLiteDatabase db) throws WrappedException, UnavailableStorageException { try { - // We need to open the folder first to make sure we've got it's id + // We need to open the folder first to make sure we've got its id open(OPEN_MODE_RO); List messages = getMessages(null); for (LocalMessage message : messages) {