added runOnBranchChange event #4108

This commit is contained in:
zadam
2023-11-02 23:26:32 +01:00
parent 0efc42081d
commit 45ed436426
5 changed files with 16 additions and 2 deletions

View File

@@ -65,6 +65,12 @@ eventService.subscribe(eventService.ENTITY_CHANGED, ({entityName, entity}) => {
if (parentNote?.hasLabel("sorted")) {
treeService.sortNotesIfNeeded(parentNote.noteId);
}
const childNote = becca.getNote(entity.noteId);
if (childNote) {
runAttachedRelations(childNote, 'runOnBranchChange', entity);
}
}
});