mirror of
https://github.com/zadam/trilium.git
synced 2026-01-16 19:44:24 +01:00
fix(tree): tree is updated on note content updates
This commit is contained in:
parent
be81acb9e7
commit
ddba0e823c
@ -1163,10 +1163,18 @@ export default class NoteTreeWidget extends NoteContextAwareWidget {
|
||||
const { movedActiveNode, parentsOfAddedNodes } = await this.#processBranchRows(branchRows, refreshCtx);
|
||||
|
||||
for (const noteId of loadResults.getNoteIds()) {
|
||||
const contentReloaded = loadResults.isNoteContentReloaded(noteId);
|
||||
if (contentReloaded && !loadResults.isNoteReloaded(noteId, contentReloaded.componentId)) {
|
||||
// Only the note content was reloaded, not the note itself. This would cause a redundant update on every few seconds while editing a note.
|
||||
continue;
|
||||
}
|
||||
|
||||
refreshCtx.noteIdsToUpdate.add(noteId);
|
||||
}
|
||||
|
||||
await this.#executeTreeUpdates(refreshCtx, loadResults);
|
||||
if (refreshCtx.noteIdsToUpdate.size + refreshCtx.noteIdsToReload.size > 0) {
|
||||
await this.#executeTreeUpdates(refreshCtx, loadResults);
|
||||
}
|
||||
|
||||
await this.#setActiveNode(activeNotePath, activeNodeFocused, movedActiveNode, parentsOfAddedNodes);
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user