mirror of
https://github.com/zadam/trilium.git
synced 2025-11-02 19:36:12 +01:00
fixed triggers to sort children of notes with "sorted" label, closes #1126
This commit is contained in:
@@ -68,6 +68,9 @@ eventService.subscribe(eventService.ENTITY_CREATED, async ({ entityName, entity
|
||||
|
||||
await note.setContent(await targetNote.getContent());
|
||||
}
|
||||
else if (entity.type === 'label' && entity.name === 'sorted') {
|
||||
await treeService.sortNotesAlphabetically(entity.noteId);
|
||||
}
|
||||
}
|
||||
else if (entityName === 'notes') {
|
||||
await runAttachedRelations(entity, 'runOnNoteCreation', entity);
|
||||
@@ -135,4 +138,4 @@ eventService.subscribe(eventService.ENTITY_DELETED, async ({ entityName, entity
|
||||
targetNote.invalidateAttributeCache();
|
||||
}
|
||||
});
|
||||
});
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user