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

Desktop: Fix to update the note list if the selected tag is deleted. (#2398)

* Refresh the note list if the selected tag is deleted.

* Handle case where last note is untagged (by following the note)

* Corrections.

* Correct call to asynchronous function.
This commit is contained in:
mic704b 2020-02-10 09:08:24 +11:00 committed by GitHub
parent d8ef15a1e2
commit cd9d5db3c2
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -443,6 +443,16 @@ class BaseApplication {
refreshNotes = true;
}
if (action.type == 'NOTE_TAG_REMOVE') {
if (newState.notesParentType === 'Tag' && newState.selectedTagId === action.item.id) {
if (newState.notes.length === newState.selectedNoteIds.length) {
await this.refreshCurrentFolder();
refreshNotesUseSelectedNoteId = true;
}
refreshNotes = true;
}
}
if (refreshNotes) {
await this.refreshNotes(newState, refreshNotesUseSelectedNoteId, refreshNotesHash);
}