From 0190170edd2a6738c81c61d77bcac81a86b6921f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?David=20H=C3=A4rdeman?= Date: Wed, 25 Aug 2021 00:12:46 +0200 Subject: [PATCH] [snappymail] Include subfolders in folder list rebuild Subfolders also need to be taken into consideration, otherwise subfolder deletion/creation won't be reflected in the UI. Fixes #72 --- dev/Model/FolderCollection.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/dev/Model/FolderCollection.js b/dev/Model/FolderCollection.js index 54ed0b753..1332f7e14 100644 --- a/dev/Model/FolderCollection.js +++ b/dev/Model/FolderCollection.js @@ -68,12 +68,12 @@ export class FolderCollectionModel extends AbstractCollectionModel return super.reviveFromJson(object, oFolder => { let oCacheFolder = Cache.getFolderFromCacheList(oFolder.FullNameRaw); -/* + if (oCacheFolder) { oFolder.SubFolders = FolderCollectionModel.reviveFromJson(oFolder.SubFolders); oFolder.SubFolders && oCacheFolder.subFolders(oFolder.SubFolders); } -*/ + if (!oCacheFolder && (oCacheFolder = FolderModel.reviveFromJson(oFolder))) { if (1 == SystemFolders.indexOf(oFolder.FullNameRaw)) { oCacheFolder.type(FolderType.Inbox);