Build your personal knowledge base with Trilium Notes
TypeScript electronelectron-appknowledge-baseknowledge-graphknowledge-managementknowledge-management-graphlocal-firstnote-managmentnote-takernote-takingnotebooknotesnotes-apppersonal-knowledge-basepersonal-wikiscriptableself-hostedself-hostingwiki
fix(bookmarks): not refreshing when protected session is refreshed (closes #9701)
Elian Doran69249bfef855
diff --git a/apps/client/src/widgets/react/hooks.tsx b/apps/client/src/widgets/react/hooks.tsxindex d507c7e962..761b45c49f 100644--- a/apps/client/src/widgets/react/hooks.tsx+++ b/apps/client/src/widgets/react/hooks.tsx@@ -1198,6 +1198,12 @@ export function useChildNotes(parentNoteId: string | undefined) {refresh();}, [ refresh ]);+ // Swap to fresh FNote refs after a full froca reload (e.g. entering a protected session+ // clears the cache and creates new instances — old refs are orphaned with stale titles).+ useTriliumEvent("frocaReloaded", () => {+ refresh();+ });+// Refresh on branch changes.useTriliumEvent("entitiesReloaded", ({ loadResults }) => {if (parentNoteId && loadResults.getBranchRows().some(branch => branch.parentNoteId === parentNoteId)) {