mirror of
https://github.com/zadam/trilium.git
synced 2025-11-03 03:46:37 +01:00
tree change listener and others
This commit is contained in:
@@ -230,10 +230,11 @@ class TreeCache {
|
||||
return child.parentToBranch[parentNoteId];
|
||||
}
|
||||
|
||||
// FIXME does not actually belong here
|
||||
async processSyncRows(syncRows) {
|
||||
const noteIdsToReload = [];
|
||||
|
||||
const loadResults = new LoadResults();
|
||||
const loadResults = new LoadResults(this);
|
||||
|
||||
syncRows.filter(sync => sync.entityName === 'branches').forEach(sync => {
|
||||
noteIdsToReload.push(sync.parentNoteId);
|
||||
@@ -261,6 +262,11 @@ class TreeCache {
|
||||
loadResults.addAttribute(sync.entityId, sync.sourceId);
|
||||
});
|
||||
|
||||
// missing reloading the relation target note
|
||||
syncRows.filter(sync => sync.entityName === 'note_revisions').forEach(sync => {
|
||||
loadResults.addNoteRevision(sync.entityId, sync.noteId, sync.sourceId);
|
||||
});
|
||||
|
||||
await this.reloadNotes(noteIdsToReload);
|
||||
|
||||
const appContext = (await import('./app_context.js')).default;
|
||||
|
||||
Reference in New Issue
Block a user