From 074a60d3cf93bcede88ea4d70b07cf7480be4229 Mon Sep 17 00:00:00 2001 From: Stephen Zhou <38493346+hyoban@users.noreply.github.com> Date: Mon, 28 Oct 2024 10:00:07 +0800 Subject: [PATCH] fix: auto load achieved entries when show achieved button is available --- apps/renderer/src/modules/entry-column/index.tsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/apps/renderer/src/modules/entry-column/index.tsx b/apps/renderer/src/modules/entry-column/index.tsx index b2bd89d87..cf5f44227 100644 --- a/apps/renderer/src/modules/entry-column/index.tsx +++ b/apps/renderer/src/modules/entry-column/index.tsx @@ -171,10 +171,10 @@ function EntryColumnImpl() { // automatically fetch archived entries when there is no entries in timeline useEffect(() => { - if (!isArchived && virtuosoOptions.totalCount === 0 && !entries.isLoading) { + if (showArchivedButton && virtuosoOptions.totalCount === 0 && !entries.isLoading) { setIsArchived(true) } - }, [entries.isLoading, isArchived, virtuosoOptions.totalCount]) + }, [entries.isLoading, showArchivedButton, virtuosoOptions.totalCount]) return (