From 76fc17eddf1137fb9af227b5a951d62ce4e7cc58 Mon Sep 17 00:00:00 2001 From: Innei Date: Mon, 9 Dec 2024 21:34:14 +0800 Subject: [PATCH] fix: add entryId to deps, try fix `isActive` judge Signed-off-by: Innei --- .../src/modules/entry-column/layouts/EntryItemWrapper.tsx | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/apps/renderer/src/modules/entry-column/layouts/EntryItemWrapper.tsx b/apps/renderer/src/modules/entry-column/layouts/EntryItemWrapper.tsx index 01a44b960..306c8feb2 100644 --- a/apps/renderer/src/modules/entry-column/layouts/EntryItemWrapper.tsx +++ b/apps/renderer/src/modules/entry-column/layouts/EntryItemWrapper.tsx @@ -35,7 +35,10 @@ export const EntryItemWrapper: FC< const { t } = useTranslation("common") - const isActive = useRouteParamsSelector(({ entryId }) => entryId === entry.entries.id) + const isActive = useRouteParamsSelector( + ({ entryId }) => entryId === entry.entries.id, + [entry.entries.id], + ) const asRead = useAsRead(entry) const hoverMarkUnread = useGeneralSettingKey("hoverMarkUnread")