From 51513d3779bdebd5cb13f9b2e9d6715572d733c1 Mon Sep 17 00:00:00 2001 From: Elian Doran Date: Mon, 5 Jan 2026 21:03:32 +0200 Subject: [PATCH 1/2] fix(status_bar): count not refreshing properly after change --- apps/client/src/widgets/layout/StatusBar.tsx | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/apps/client/src/widgets/layout/StatusBar.tsx b/apps/client/src/widgets/layout/StatusBar.tsx index 3c852ba14..6a021a0b7 100644 --- a/apps/client/src/widgets/layout/StatusBar.tsx +++ b/apps/client/src/widgets/layout/StatusBar.tsx @@ -5,7 +5,7 @@ import { Dropdown as BootstrapDropdown } from "bootstrap"; import clsx from "clsx"; import { type ComponentChildren, RefObject } from "preact"; import { createPortal } from "preact/compat"; -import { useContext, useEffect, useMemo, useRef, useState } from "preact/hooks"; +import { useCallback, useContext, useEffect, useMemo, useRef, useState } from "preact/hooks"; import { CommandNames } from "../../components/app_context"; import NoteContext from "../../components/note_context"; @@ -338,15 +338,19 @@ interface AttributesProps extends StatusBarContext { function AttributesButton({ note, attributesShown, setAttributesShown }: AttributesProps) { const [ count, setCount ] = useState(note.attributes.length); + const refreshCount = useCallback((note: FNote) => { + return note.getAttributes().filter(a => !a.isAutoLink).length; + }, []); + // React to note changes. useEffect(() => { - setCount(note.getAttributes().filter(a => !a.isAutoLink).length); - }, [ note ]); + setCount(refreshCount(note)); + }, [ note, refreshCount ]); // React to changes in count. useTriliumEvent("entitiesReloaded", (({loadResults}) => { if (loadResults.getAttributeRows().some(attr => attributes.isAffecting(attr, note))) { - setCount(note.attributes.length); + setCount(refreshCount(note)); } })); From 494b55d685600a1e1189e2f5ef0d9861d54ff800 Mon Sep 17 00:00:00 2001 From: Elian Doran Date: Mon, 5 Jan 2026 23:39:36 +0200 Subject: [PATCH 2/2] fix(ckeditor): missing pl locale --- packages/ckeditor5/src/i18n.ts | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/packages/ckeditor5/src/i18n.ts b/packages/ckeditor5/src/i18n.ts index a409fa437..dd4e616d3 100644 --- a/packages/ckeditor5/src/i18n.ts +++ b/packages/ckeditor5/src/i18n.ts @@ -50,6 +50,11 @@ const LOCALE_MAPPINGS: Record = { coreTranslation: () => import("ckeditor5/translations/ja.js"), premiumFeaturesTranslation: () => import("ckeditor5-premium-features/translations/ja.js"), }, + pl: { + languageCode: "pl", + coreTranslation: () => import("ckeditor5/translations/pl.js"), + premiumFeaturesTranslation: () => import("ckeditor5-premium-features/translations/pl.js"), + }, pt: { languageCode: "pt", coreTranslation: () => import("ckeditor5/translations/pt.js"),