mirror of
https://github.com/zadam/trilium.git
synced 2026-01-07 23:24:25 +01:00
fix(breadcrumb): hiding archived notes doesn't update tree
This commit is contained in:
parent
193c9d8fa6
commit
0390fd3174
@ -71,7 +71,7 @@ export default function Breadcrumb() {
|
||||
|
||||
<div
|
||||
className="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
|
||||
}
|
||||
],
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user