mirror of
https://github.com/the-djmaze/snappymail.git
synced 2026-07-13 03:27:39 +03:00
Speedup generating folderlist
This commit is contained in:
parent
f992a06b63
commit
4d6d0622e5
5 changed files with 29 additions and 21 deletions
|
|
@ -57,18 +57,6 @@ export const FolderUserStore = new class {
|
|||
|
||||
draftFolderNotEnabled: () => !this.draftFolder() || UNUSED_OPTION_VALUE === this.draftFolder(),
|
||||
|
||||
// foldersListWithSingleInboxRootFolder
|
||||
/** returns true when there are no non-system folders in the root of the folders tree */
|
||||
singleRootFolder: () => {
|
||||
let multiple = false;
|
||||
this.folderList.forEach(folder => {
|
||||
let subscribed = folder.subscribed(),
|
||||
hasSub = folder.hasSubscribedSubfolders();
|
||||
multiple |= (!folder.isSystemFolder() || (hasSub && !folder.isInbox())) && (subscribed || hasSub)
|
||||
});
|
||||
return !multiple;
|
||||
},
|
||||
|
||||
currentFolderFullNameRaw: () => (this.currentFolder() ? this.currentFolder().fullNameRaw : ''),
|
||||
|
||||
currentFolderFullName: () => (this.currentFolder() ? this.currentFolder().fullName : ''),
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue