fixed triggers to sort children of notes with "sorted" label, closes #1126

This commit is contained in:
zadam
2020-06-23 22:03:01 +02:00
parent a0395e9866
commit c78ca4c9db
3 changed files with 13 additions and 3 deletions

View File

@@ -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();
}
});
});
});