mirror of
https://github.com/zadam/trilium.git
synced 2025-11-05 04:45:47 +01:00
refactored entity reloading
This commit is contained in:
@@ -220,8 +220,8 @@ export default class NoteDetailWidget extends TabAwareWidget {
|
||||
this.refresh();
|
||||
}
|
||||
|
||||
notesReloadedListener(data) {
|
||||
super.notesReloadedListener(data);
|
||||
entitiesReloadedListener(data) {
|
||||
super.entitiesReloadedListener(data);
|
||||
|
||||
return false; // stop propagation to children
|
||||
}
|
||||
|
||||
@@ -427,7 +427,7 @@ export default class NoteTreeWidget extends TabAwareWidget {
|
||||
}
|
||||
}
|
||||
|
||||
async notesReloadedListener({loadResults}) {
|
||||
async entitiesReloadedListener({loadResults}) {
|
||||
const activeNode = this.getActiveNode();
|
||||
const activateNotePath = activeNode ? await treeService.getNotePath(activeNode) : null;
|
||||
|
||||
@@ -511,7 +511,7 @@ export default class NoteTreeWidget extends TabAwareWidget {
|
||||
// activateNotePath = appContext.getActiveTabNotePath();
|
||||
// }
|
||||
//
|
||||
// appContext.trigger('notesReloaded', { noteIds, activateNotePath });
|
||||
// appContext.trigger('entitiesReloaded', { noteIds, activateNotePath });
|
||||
// }
|
||||
|
||||
async reloadTreeListener() {
|
||||
|
||||
@@ -60,7 +60,7 @@ export default class TabAwareWidget extends BasicWidget {
|
||||
this.activeTabChanged();
|
||||
}
|
||||
|
||||
notesReloadedListener({loadResults}) {
|
||||
entitiesReloadedListener({loadResults}) {
|
||||
if (loadResults.isNoteReloaded(this.noteId, this.componentId)) {
|
||||
this.refreshWithNote(this.note, this.notePath);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user