From 7dd19c0366e65a0c2e702c36ff0a0d1155417eca Mon Sep 17 00:00:00 2001 From: zadam Date: Tue, 9 Feb 2021 20:26:10 +0100 Subject: [PATCH] correct reloading of note subtree when relevant labels change --- src/public/app/entities/note_short.js | 4 ++-- src/public/app/widgets/note_tree.js | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/public/app/entities/note_short.js b/src/public/app/entities/note_short.js index 45b69d8fd..a35e1399d 100644 --- a/src/public/app/entities/note_short.js +++ b/src/public/app/entities/note_short.js @@ -508,13 +508,13 @@ class NoteShort { visitedNoteIds.add(this.noteId); for (const templateNote of this.getTemplateNotes()) { - if (templateNote.hasAncestor(ancestorNote)) { + if (templateNote.hasAncestor(ancestorNote, visitedNoteIds)) { return true; } } for (const parentNote of this.getParentNotes()) { - if (parentNote.hasAncestor(ancestorNote)) { + if (parentNote.hasAncestor(ancestorNote, visitedNoteIds)) { return true; } } diff --git a/src/public/app/widgets/note_tree.js b/src/public/app/widgets/note_tree.js index 0f534487f..daeb06903 100644 --- a/src/public/app/widgets/note_tree.js +++ b/src/public/app/widgets/note_tree.js @@ -1030,7 +1030,7 @@ export default class NoteTreeWidget extends TabAwareWidget { const noteIdsToReload = new Set(); for (const attr of loadResults.getAttributes()) { - if (attr.type === 'label' && ['iconClass', 'cssClass'].includes(attr.name)) { + if (attr.type === 'label' && ['iconClass', 'cssClass', 'workspace', 'workspaceIconClass', 'archived'].includes(attr.name)) { if (attr.isInheritable) { noteIdsToReload.add(attr.noteId); }