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(breadcrumb): hiding archived notes doesn't update tree
Elian Doran0390fd3174fe
diff --git a/apps/client/src/widgets/layout/Breadcrumb.tsx b/apps/client/src/widgets/layout/Breadcrumb.tsxindex f51ab8fdc6..ac7ddc657a 100644--- a/apps/client/src/widgets/layout/Breadcrumb.tsx+++ b/apps/client/src/widgets/layout/Breadcrumb.tsx@@ -71,7 +71,7 @@ export default function Breadcrumb() {<divclassName="filler"- onContextMenu={buildEmptyAreaContextMenu()}+ onContextMenu={buildEmptyAreaContextMenu(parentComponent)}/></div>);@@ -406,7 +406,7 @@ function buildContextMenu(notePath: string, parentComponent: Component | null) {//#endregion//#region Empty context menu-function buildEmptyAreaContextMenu() {+function buildEmptyAreaContextMenu(parentComponent: Component | null) {return (e: MouseEvent) => {const hideArchivedNotes = (options.get("hideArchivedNotes_main") === "true");@@ -415,7 +415,12 @@ function buildEmptyAreaContextMenu() {items: [{title: t("breadcrumb.empty_hide_archived_notes"),- handler: () => options.save("hideArchivedNotes_main", !hideArchivedNotes ? "true" : "false"),+ handler: async () => {+ await options.save("hideArchivedNotes_main", !hideArchivedNotes ? "true" : "false");++ // Note tree doesn't update by itself.+ parentComponent?.triggerEvent("frocaReloaded", {});+ },checked: hideArchivedNotes}],