mirror of
https://github.com/zadam/trilium.git
synced 2025-11-05 04:45:47 +01:00
wip
This commit is contained in:
@@ -232,10 +232,14 @@ class TreeCache {
|
||||
|
||||
// FIXME does not actually belong here
|
||||
async processSyncRows(syncRows) {
|
||||
const noteIdsToReload = [];
|
||||
|
||||
const loadResults = new LoadResults(this);
|
||||
|
||||
syncRows.filter(sync => sync.entityName === 'notes').forEach(sync => {
|
||||
|
||||
|
||||
loadResults.addNote(sync.entityId, sync.sourceId);
|
||||
});
|
||||
|
||||
syncRows.filter(sync => sync.entityName === 'branches').forEach(sync => {
|
||||
noteIdsToReload.push(sync.parentNoteId);
|
||||
noteIdsToReload.push(sync.noteId);
|
||||
@@ -243,12 +247,6 @@ class TreeCache {
|
||||
loadResults.addBranch(sync.entityId, sync.sourceId);
|
||||
});
|
||||
|
||||
syncRows.filter(sync => sync.entityName === 'notes').forEach(sync => {
|
||||
noteIdsToReload.push(sync.entityId);
|
||||
|
||||
loadResults.addNote(sync.entityId, sync.sourceId);
|
||||
});
|
||||
|
||||
syncRows.filter(sync => sync.entityName === 'note_reordering').forEach(sync => {
|
||||
noteIdsToReload.push(sync.entityId);
|
||||
|
||||
@@ -267,8 +265,6 @@ class TreeCache {
|
||||
loadResults.addNoteRevision(sync.entityId, sync.noteId, sync.sourceId);
|
||||
});
|
||||
|
||||
await this.reloadNotes(noteIdsToReload);
|
||||
|
||||
const appContext = (await import('./app_context.js')).default;
|
||||
appContext.trigger('entitiesReloaded', {loadResults});
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user