mirror of
https://github.com/zadam/trilium.git
synced 2025-11-06 21:36:05 +01:00
take branch prefix into account while sorting, fixes #3896
This commit is contained in:
@@ -61,6 +61,12 @@ 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') {
|
||||
const parentNote = becca.getNote(entity.parentNoteId);
|
||||
|
||||
if (parentNote?.hasLabel("sorted")) {
|
||||
treeService.sortNotesIfNeeded(parentNote.noteId);
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user