1
0
mirror of https://github.com/laurent22/joplin.git synced 2025-01-11 18:24:43 +02:00

All: 1383 Clear selected Notes when switching Notebook (#1387)

This commit is contained in:
Tim Kilåker 2019-04-04 08:48:33 +02:00 committed by Laurent Cozic
parent 72b36522e8
commit 542a5e88b7

View File

@ -218,6 +218,7 @@ function changeSelectedFolder(state, action, options = null) {
if (newState.selectedFolderId === state.selectedFolderId && newState.notesParentType === state.notesParentType) return state;
if (options.clearNoteHistory) newState.historyNotes = [];
if (options.clearSelectedNoteIds) newState.selectedNoteIds = [];
return newState;
}
@ -348,7 +349,7 @@ const reducer = (state = defaultState, action) => {
case 'FOLDER_SELECT':
newState = changeSelectedFolder(state, action);
newState = changeSelectedFolder(state, action, { clearSelectedNoteIds: true });
break;
case 'FOLDER_AND_NOTE_SELECT':