From 0390fd3174febc707cd083ab74074a2a36fc1dd1 Mon Sep 17 00:00:00 2001 From: Elian Doran Date: Tue, 16 Dec 2025 16:03:09 +0200 Subject: [PATCH] fix(breadcrumb): hiding archived notes doesn't update tree --- apps/client/src/widgets/layout/Breadcrumb.tsx | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/apps/client/src/widgets/layout/Breadcrumb.tsx b/apps/client/src/widgets/layout/Breadcrumb.tsx index f51ab8fdc..ac7ddc657 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() {
); @@ -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 } ],