mirror of
https://github.com/zadam/trilium.git
synced 2025-11-06 21:36:05 +01:00
improvements
This commit is contained in:
@@ -162,8 +162,6 @@ eventService.subscribe(eventService.ENTITY_CHANGED, ({ entityName, entity }) =>
|
||||
});
|
||||
});
|
||||
|
||||
const debouncedCreateMissingSpecialNotes = debounce(() => specialNotesService.createMissingSpecialNotes(), 300);
|
||||
|
||||
eventService.subscribe(eventService.ENTITY_DELETED, ({ entityName, entity }) => {
|
||||
processInverseRelations(entityName, entity, (definition, note, targetNote) => {
|
||||
// if one inverse attribute is deleted then the other should be deleted as well
|
||||
@@ -179,13 +177,6 @@ eventService.subscribe(eventService.ENTITY_DELETED, ({ entityName, entity }) =>
|
||||
if (entityName === 'branches') {
|
||||
runAttachedRelations(entity.getNote(), 'runOnBranchDeletion', entity);
|
||||
}
|
||||
|
||||
if (entityName === 'notes') {
|
||||
if (entity.noteId.startsWith("lb_")) {
|
||||
// if user deletes shortcuts, restore them immediately
|
||||
debouncedCreateMissingSpecialNotes();
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
module.exports = {
|
||||
|
||||
Reference in New Issue
Block a user