Improved handling of visible folders

This commit is contained in:
the-djmaze 2024-02-11 15:03:19 +01:00
parent 7ca5991041
commit 6c144b5a28
3 changed files with 9 additions and 8 deletions

View file

@ -254,6 +254,10 @@ export class FolderCollectionModel extends AbstractCollectionModel
return result;
}
visible() {
return this.filter(folder => folder.visible());
}
storeIt() {
FolderUserStore.displaySpecSetting(Settings.app('folderSpecLimit') < this.CountRec);
@ -387,6 +391,7 @@ export class FolderModel extends AbstractModel {
// isSubscribed: () => this.attributes().includes('\\subscribed'),
hasVisibleSubfolders: () => !!this.subFolders().find(folder => folder.visible()),
visibleSubfolders: () => this.subFolders().visible(),
hasSubscriptions: () => this.isSubscribed() | !!this.subFolders().find(
oFolder => {