Fix deleting folders no longer on the server

This commit is contained in:
cketti 2019-01-06 22:24:47 +01:00
parent 6a64d5e380
commit c6dd59dee4
2 changed files with 5 additions and 2 deletions

View file

@ -49,7 +49,10 @@ class K9BackendStorage(
folderServerIds.asSequence() folderServerIds.asSequence()
.filterNot { account.isSpecialFolder(it) } .filterNot { account.isSpecialFolder(it) }
.map { localStore.getFolder(it) } .map { localStore.getFolder(it) }
.forEach { it.delete() } .forEach {
it.delete()
it.delete(true)
}
specialFolderUpdater.updateSpecialFolders() specialFolderUpdater.updateSpecialFolders()
} }

View file

@ -1906,7 +1906,7 @@ public class LocalFolder extends Folder<LocalMessage> {
@Override @Override
public Void doDbWork(final SQLiteDatabase db) throws WrappedException, UnavailableStorageException { public Void doDbWork(final SQLiteDatabase db) throws WrappedException, UnavailableStorageException {
try { 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); open(OPEN_MODE_RO);
List<LocalMessage> messages = getMessages(null); List<LocalMessage> messages = getMessages(null);
for (LocalMessage message : messages) { for (LocalMessage message : messages) {