1
0
mirror of https://github.com/laurent22/joplin.git synced 2025-06-12 22:57:38 +02:00

Electron: When deleting tag that is currently selected, select a new tag or folder

This commit is contained in:
Laurent Cozic
2017-11-12 17:37:04 +00:00
parent f9a06bb5b9
commit 6d2a5a7b32
6 changed files with 69 additions and 22 deletions

View File

@ -61,6 +61,10 @@ function handleItemDelete(state, action) {
const newIndex = previousIndex >= 0 ? newItems[previousIndex].id : null;
newState[selectedItemKey] = newIndex;
if (!newIndex && newState.notesParentType !== 'Folder') {
newState.notesParentType = 'Folder';
}
return newState;
}