[snappymail] Allow deletion of parent folder with subfolders

This change brings snappymails behaviour in line with RFC3501, section 6.3.4,
by allowing "real" (i.e. non-\Noselect) parent folders to be deleted and
by not performing a recursive deletion of subfolders.
This commit is contained in:
David Härdeman 2021-08-24 18:01:09 +02:00
parent ef4d604f6d
commit 72ff960114
2 changed files with 2 additions and 2 deletions

View file

@ -304,7 +304,7 @@ export class FolderModel extends AbstractModel {
return null; return null;
}, },
canBeDeleted: () => !folder.isSystemFolder() && !folder.subFolders().length, canBeDeleted: () => !folder.isSystemFolder() && folder.selectable,
canBeSubscribed: () => !folder.isSystemFolder() canBeSubscribed: () => !folder.isSystemFolder()
&& SettingsUserStore.hideUnsubscribed() && SettingsUserStore.hideUnsubscribed()

View file

@ -98,7 +98,7 @@ export class FoldersUserSettings {
if (folderToRemove === folder) { if (folderToRemove === folder) {
return true; return true;
} }
folder.subFolders.remove(fRemoveFolder); //folder.subFolders.remove(fRemoveFolder);
return false; return false;
}; };