mirror of
https://github.com/the-djmaze/snappymail.git
synced 2026-08-29 20:19:22 +03:00
Improved FolderCollection handling
This commit is contained in:
parent
a61ef0fa1c
commit
33c10365f0
10 changed files with 79 additions and 97 deletions
|
|
@ -227,8 +227,6 @@ export class FolderCollectionModel extends AbstractCollectionModel
|
|||
name: name,
|
||||
fullName: parentName,
|
||||
delimiter: delimiter,
|
||||
exists: false,
|
||||
isSubscribed: false,
|
||||
flags: ['\\nonexistent']
|
||||
});
|
||||
setFolder(pfolder);
|
||||
|
|
@ -380,6 +378,8 @@ export class FolderModel extends AbstractModel {
|
|||
isFlagged: () => FolderUserStore.currentFolder() === this
|
||||
&& MessagelistUserStore.listSearch().includes('flagged'),
|
||||
|
||||
// isSubscribed: () => this.flags().includes('\\subscribed'),
|
||||
|
||||
hasVisibleSubfolders: () => !!this.subFolders().find(folder => folder.visible()),
|
||||
|
||||
hasSubscriptions: () => this.isSubscribed() | !!this.subFolders().find(
|
||||
|
|
@ -535,6 +535,10 @@ export class FolderModel extends AbstractModel {
|
|||
path.pop();
|
||||
folder.parentName = path.join(folder.delimiter);
|
||||
|
||||
folder.isSubscribed(folder.flags.includes('\\subscribed'));
|
||||
folder.exists = !folder.flags.includes('\\nonexistent');
|
||||
folder.selectable(folder.exists && !folder.flags.includes('\\noselect'));
|
||||
|
||||
type && 'mail' != type && folder.kolabType(type);
|
||||
}
|
||||
return folder;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue