Skip to content

Commit 996629c

Browse files
committed
fix: remove prev entries ids ref
1 parent 5beaca3 commit 996629c

File tree

1 file changed

+1
-11
lines changed
  • apps/renderer/src/modules/entry-column

1 file changed

+1
-11
lines changed

apps/renderer/src/modules/entry-column/index.tsx

Lines changed: 1 addition & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -64,13 +64,6 @@ function EntryColumnImpl() {
6464

6565
const { entriesIds, isFetchingNextPage, groupedCounts } = entries
6666
useSnapEntryIdList(entriesIds)
67-
const prevEntriesIdsRef = useRef(entriesIds)
68-
69-
useEffect(() => {
70-
if (entriesIds.length > 0) {
71-
prevEntriesIdsRef.current = entriesIds
72-
}
73-
}, [entriesIds])
7467

7568
const {
7669
entryId: activeEntryId,
@@ -135,9 +128,6 @@ function EntryColumnImpl() {
135128
}
136129
}, [shouldLoadArchivedEntries])
137130

138-
const finalEntriesIds =
139-
hasNoEntries && !isArchived ? prevEntriesIdsRef.current || entriesIds : entriesIds
140-
141131
const scrollRef = useRef<HTMLDivElement>(null)
142132

143133
const handleScroll = useCallback(
@@ -195,7 +185,7 @@ function EntryColumnImpl() {
195185
await entries.fetchNextPage()
196186
}
197187
}, [entries]),
198-
data: finalEntriesIds,
188+
data: entriesIds,
199189
onScroll: handleScroll,
200190
itemContent: useTypeScriptHappyCallback(
201191
(_, entryId) => {

0 commit comments

Comments
 (0)