Skip to content

Commit

Permalink
feat: load archived entries automatically
Browse files Browse the repository at this point in the history
  • Loading branch information
hyoban committed Oct 26, 2024
1 parent b4a3197 commit 5fe9e0c
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions apps/renderer/src/modules/entry-column/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -169,6 +169,13 @@ function EntryColumnImpl() {
const navigate = useNavigateEntry()
const isRefreshing = entries.isFetching && !entries.isFetchingNextPage

// automatically fetch archived entries when there is no entries in timeline
useEffect(() => {
if (!isArchived && virtuosoOptions.totalCount === 0 && !entries.isLoading) {
setIsArchived(true)
}
}, [entries.isLoading, isArchived, virtuosoOptions.totalCount])

return (
<div
className="relative flex h-full flex-1 flex-col @container"
Expand Down

0 comments on commit 5fe9e0c

Please sign in to comment.