mirror of
https://github.com/zadam/trilium.git
synced 2025-03-01 14:22:32 +01:00
change of archived label should force a reload of the parents since it can change its visibility status, fixes #3422
This commit is contained in:
parent
223ca95829
commit
c4b0c44919
@ -1047,7 +1047,7 @@ export default class NoteTreeWidget extends NoteContextAwareWidget {
|
||||
const noteIdsToReload = new Set();
|
||||
|
||||
for (const ecAttr of loadResults.getAttributes()) {
|
||||
if (ecAttr.type === 'label' && ['iconClass', 'cssClass', 'workspace', 'workspaceIconClass', 'archived', 'color'].includes(ecAttr.name)) {
|
||||
if (ecAttr.type === 'label' && ['iconClass', 'cssClass', 'workspace', 'workspaceIconClass', 'color'].includes(ecAttr.name)) {
|
||||
if (ecAttr.isInheritable) {
|
||||
noteIdsToReload.add(ecAttr.noteId);
|
||||
}
|
||||
@ -1055,6 +1055,17 @@ export default class NoteTreeWidget extends NoteContextAwareWidget {
|
||||
noteIdsToUpdate.add(ecAttr.noteId);
|
||||
}
|
||||
}
|
||||
else if (ecAttr.type === 'label' && ecAttr.name === 'archived') {
|
||||
const note = froca.getNoteFromCache(ecAttr.noteId);
|
||||
|
||||
if (note) {
|
||||
// change of archived status can mean the note should not be displayed in the tree at all
|
||||
// depending on the value of this.hideArchivedNotes
|
||||
for (const parentNote of note.getParentNotes()) {
|
||||
noteIdsToReload.add(parentNote.noteId);
|
||||
}
|
||||
}
|
||||
}
|
||||
else if (ecAttr.type === 'relation' && ecAttr.name === 'template') {
|
||||
// missing handling of things inherited from template
|
||||
noteIdsToReload.add(ecAttr.noteId);
|
||||
|
Loading…
x
Reference in New Issue
Block a user