1
0
mirror of https://github.com/laurent22/joplin.git synced 2025-02-04 19:16:07 +02:00

Desktop: Fixes #5584: Clicking on folder button was no longer jumping to the right folder

Regression introduced by https://github.com/laurent22/joplin/issues/4697
This commit is contained in:
Laurent Cozic 2022-03-03 13:33:52 +00:00
parent 299a14755a
commit 32de63fad3

View File

@ -754,15 +754,9 @@ const reducer = produce((draft: Draft<State> = defaultState, action: any) => {
case 'FOLDER_AND_NOTE_SELECT':
{
changeSelectedFolder(draft, action);
const noteSelectAction = Object.assign({}, action, { type: 'NOTE_SELECT' });
if (draft.notesParentType === 'SmartFilter' && draft.selectedSmartFilterId === ALL_NOTES_FILTER_ID) {
// we don't want to change folder when 'All Notes' filter is on
changeSelectedNotes(draft, noteSelectAction);
} else {
changeSelectedFolder(draft, action);
changeSelectedNotes(draft, noteSelectAction);
}
changeSelectedNotes(draft, noteSelectAction);
}
break;