improvements

This commit is contained in:
zadam
2022-12-06 23:48:44 +01:00
parent b9632a7814
commit 5fc9f5f3f9
22 changed files with 81 additions and 73 deletions

View File

@@ -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 = {