fix(GroupFoldersHome): Show all leaf groupfolders#4516
Conversation
|
/backport to stable33 please |
|
/backport to stable32 please |
Signed-off-by: provokateurin <[email protected]>
f414a5f to
0219a39
Compare
wasn't it on purpose ? |
|
It's really confusing to users though. Especially if only use nested groupfolders and have none at the top, the list is just empty. |
|
After creating the PR I also noticed that I used "leaf" in the wrong way. |
|
|
||
| // Filter out non top-level folders | ||
| $folders = array_filter($folders, fn (FolderDefinition $folder): bool => !str_contains($folder->mountPoint, '/')); | ||
| usort($folders, static fn (FolderDefinitionWithPermissions $a, FolderDefinitionWithPermissions $b): int => $a->mountPoint <=> $b->mountPoint); |
There was a problem hiding this comment.
You can compare strings with a spaceship operator ? 🤯
There was a problem hiding this comment.
It's the easiest way to do it in a sort function and we do it all the time 😅
There was a problem hiding this comment.
Thought it was only for integers 🙈
If nested groupfolders are used they don't show up in the left sidebar.