1
0
mirror of https://github.com/laurent22/joplin.git synced 2025-11-26 22:41:17 +02:00

Desktop: Add a button to collapse or expand all folders (#11905)

This commit is contained in:
Laurent Cozic
2025-03-02 22:20:47 +00:00
committed by GitHub
parent 0cc0fec8c3
commit 06359834d6
13 changed files with 144 additions and 9 deletions

View File

@@ -449,6 +449,11 @@ function stateHasEncryptedItems(state: State) {
// eslint-disable-next-line @typescript-eslint/no-explicit-any -- Old code before rule was applied
function folderSetCollapsed(draft: Draft<State>, action: any) {
if (action.ids) {
draft.collapsedFolderIds = action.ids;
return;
}
const collapsedFolderIds = draft.collapsedFolderIds.slice();
const idx = collapsedFolderIds.indexOf(action.id);