fix(breadcrumb): note title update (#8784)

This commit is contained in:
Elian Doran 2026-02-21 17:23:32 +02:00 committed by GitHub
commit 4ef72fb35b
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -1214,6 +1214,12 @@ export function useNoteTitle(noteId: string | undefined, parentNoteId: string |
refresh();
});
// React to external changes.
useTriliumEvent("entitiesReloaded", useCallback(({ loadResults }) => {
if (loadResults.isNoteReloaded(noteId) || (parentNoteId && loadResults.getBranchRows().some(b => b.noteId === noteId && b.parentNoteId === parentNoteId))) {
refresh();
}
}, [noteId, parentNoteId, refresh]));
return title;
}