mirror of
https://github.com/zadam/trilium.git
synced 2025-11-06 21:36:05 +01:00
fix runOnNoteContentChange event
This commit is contained in:
@@ -59,9 +59,7 @@ eventService.subscribe([ eventService.ENTITY_CHANGED, eventService.ENTITY_DELETE
|
||||
});
|
||||
|
||||
eventService.subscribe(eventService.ENTITY_CHANGED, ({entityName, entity}) => {
|
||||
if (entityName === 'note_contents') { // FIXME
|
||||
runAttachedRelations(entity, 'runOnNoteContentChange', entity);
|
||||
} else if (entityName === 'branches') {
|
||||
if (entityName === 'branches') {
|
||||
const parentNote = becca.getNote(entity.parentNoteId);
|
||||
|
||||
if (parentNote?.hasLabel("sorted")) {
|
||||
@@ -70,6 +68,10 @@ eventService.subscribe(eventService.ENTITY_CHANGED, ({entityName, entity}) => {
|
||||
}
|
||||
});
|
||||
|
||||
eventService.subscribe(eventService.NOTE_CONTENT_CHANGE, ({entity}) => {
|
||||
runAttachedRelations(entity, 'runOnNoteContentChange', entity);
|
||||
});
|
||||
|
||||
eventService.subscribe(eventService.ENTITY_CREATED, ({ entityName, entity }) => {
|
||||
if (entityName === 'attributes') {
|
||||
runAttachedRelations(entity.getNote(), 'runOnAttributeCreation', entity);
|
||||
|
||||
Reference in New Issue
Block a user