1
0
mirror of https://github.com/laurent22/joplin.git synced 2024-12-24 10:27:10 +02:00

Desktop: Fixes #2618: Fixed renaming tag issue

This commit is contained in:
Laurent Cozic 2020-03-15 09:47:47 +00:00
parent 61d3582357
commit e7b11a2d82

View File

@ -650,8 +650,12 @@ const reducer = (state = defaultState, action) => {
break; break;
case 'TAG_UPDATE_ONE': case 'TAG_UPDATE_ONE':
{
// We only want to update the selected note tags if the tag belongs to the currently open note
const selectedNoteHasTag = !!state.selectedNoteTags.find(tag => tag.id === action.item.id);
newState = updateOneItem(state, action); newState = updateOneItem(state, action);
newState = updateOneItem(newState, action, 'selectedNoteTags'); if (selectedNoteHasTag) newState = updateOneItem(newState, action, 'selectedNoteTags');
}
break; break;
case 'NOTE_TAG_REMOVE': case 'NOTE_TAG_REMOVE':