Skip to content

Commit

Permalink
All: 1383 Clear selected Notes when switching Notebook
Browse files Browse the repository at this point in the history
  • Loading branch information
tkilaker committed Apr 3, 2019
1 parent 72b3652 commit 9990e8d
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion ReactNativeClient/lib/reducer.js
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down Expand Up @@ -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':
Expand Down

0 comments on commit 9990e8d

Please sign in to comment.