mirror of
https://github.com/zadam/trilium.git
synced 2025-10-29 09:16:45 +01:00
fix note title not updating when changing the title
This commit is contained in:
@@ -877,18 +877,12 @@ export default class NoteTreeWidget extends TabAwareWidget {
|
||||
noteIdsToUpdate.add(noteId);
|
||||
}
|
||||
|
||||
for (const noteId of noteIdsToReload) {
|
||||
for (const node of this.getNodesByNoteId(noteId)) {
|
||||
await node.load(true);
|
||||
|
||||
this.updateNode(node);
|
||||
}
|
||||
}
|
||||
|
||||
await this.batchUpdate(async () => {
|
||||
for (const noteId of noteIdsToUpdate) {
|
||||
for (const noteId of noteIdsToReload) {
|
||||
for (const node of this.getNodesByNoteId(noteId)) {
|
||||
this.updateNode(node);
|
||||
await node.load(true);
|
||||
|
||||
noteIdsToUpdate.add(noteId);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -910,6 +904,13 @@ export default class NoteTreeWidget extends TabAwareWidget {
|
||||
}
|
||||
});
|
||||
|
||||
// for some reason node update cannot be in the batchUpdate() block (node is not re-rendered)
|
||||
for (const noteId of noteIdsToUpdate) {
|
||||
for (const node of this.getNodesByNoteId(noteId)) {
|
||||
this.updateNode(node);
|
||||
}
|
||||
}
|
||||
|
||||
if (activeNotePath) {
|
||||
let node = await this.expandToNote(activeNotePath);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user