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

Desktop: Fixes #4369: Refresh note tags when a note is moved to another folder (#4574)

This commit is contained in:
Roman Musin 2021-02-23 11:21:26 +00:00 committed by GitHub
parent 38e91ea1f7
commit 0c58d238e8
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -43,17 +43,20 @@ const reduxSharedMiddleware = async function(store, next, action) {
DecryptionWorker.instance().scheduleStart();
}
// 2020-10-19: Removed "NOTE_UPDATE_ONE" because there's no property in a note that
// should trigger a refreshing of the tags.
// Trying to fix this: https://github.com/laurent22/joplin/issues/3893
if (action.type == 'NOTE_DELETE' ||
// action.type == 'NOTE_UPDATE_ONE' ||
action.type == 'NOTE_UPDATE_ALL' ||
action.type == 'NOTE_TAG_REMOVE' ||
action.type == 'TAG_UPDATE_ONE') {
refreshTags = true;
}
// handle the case when the selected note has been moved to another
// folder and a new one is now selected, need to show correct tags for it
if (action.type == 'NOTE_UPDATE_ONE' && action.changedFields.indexOf('parent_id') >= 0) {
refreshTags = true;
}
if (action.type === 'NOTE_SELECT' || action.type === 'NAV_BACK') {
const noteIds = newState.provisionalNoteIds.slice();
for (const noteId of noteIds) {