From c0cd9e36d9078fda9ce67468b0de6aae01dffdea Mon Sep 17 00:00:00 2001 From: Elian Doran Date: Fri, 19 Dec 2025 23:25:58 +0200 Subject: [PATCH] feat(right_pane_widget): hide highlights if disabled in settings --- apps/client/src/widgets/sidebar/RightPanelContainer.tsx | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/apps/client/src/widgets/sidebar/RightPanelContainer.tsx b/apps/client/src/widgets/sidebar/RightPanelContainer.tsx index bb15ee10a..3422ebf36 100644 --- a/apps/client/src/widgets/sidebar/RightPanelContainer.tsx +++ b/apps/client/src/widgets/sidebar/RightPanelContainer.tsx @@ -8,7 +8,7 @@ import { t } from "../../services/i18n"; import options from "../../services/options"; import { DEFAULT_GUTTER_SIZE } from "../../services/resizer"; import Button from "../react/Button"; -import { useActiveNoteContext, useNoteProperty, useTriliumOptionBool } from "../react/hooks"; +import { useActiveNoteContext, useNoteProperty, useTriliumOptionBool, useTriliumOptionJson } from "../react/hooks"; import Icon from "../react/Icon"; import HighlightsList from "./HighlightsList"; import TableOfContents from "./TableOfContents"; @@ -17,13 +17,14 @@ const MIN_WIDTH_PERCENT = 5; export default function RightPanelContainer() { const [ rightPaneVisible, setRightPaneVisible ] = useTriliumOptionBool("rightPaneVisible"); + const [ highlightsList ] = useTriliumOptionJson("highlightsList"); useSplit(rightPaneVisible); const { note } = useActiveNoteContext(); const noteType = useNoteProperty(note, "type"); const items = (rightPaneVisible ? [ (noteType === "text" || noteType === "doc") && , - noteType === "text" && + noteType === "text" && highlightsList.length > 0 && ] : []).filter(Boolean); return (