Skip to content

Commit

Permalink
Fix setting multiple hierarchical defaultCollapsed config options at …
Browse files Browse the repository at this point in the history
…initialization (#3946)
  • Loading branch information
cmdcolin committed Sep 25, 2023
1 parent c8ad3f2 commit 5b8b145
Showing 1 changed file with 10 additions and 12 deletions.
Expand Up @@ -287,22 +287,22 @@ export default function stateTreeFactory(pluginManager: PluginManager) {
])
) {
self.collapseTopLevelCategories()
} else if (
}
if (
getConf(session, [
'hierarchical',
'defaultCollapsed',
'subCategories',
])
) {
self.collapseSubCategories()
} else {
for (const entry of getConf(session, [
'hierarchical',
'defaultCollapsed',
'categoryNames',
])) {
self.collapsed.set(entry, true)
}
}
for (const entry of getConf(session, [
'hierarchical',
'defaultCollapsed',
'categoryNames',
])) {
self.collapsed.set(entry, true)
}
self.initialized = true
}
Expand All @@ -311,9 +311,7 @@ export default function stateTreeFactory(pluginManager: PluginManager) {
.views(self => ({
get hasAnySubcategories() {
return self.allTracks.some(group =>
group.tracks.some(
track => readConfObject(track, 'category')?.length > 1,
),
group.tracks.some(t => readConfObject(t, 'category')?.length > 1),
)
},
}))
Expand Down

0 comments on commit 5b8b145

Please sign in to comment.