From 9e45d0441ef16fb334af555c22276f7d77a72733 Mon Sep 17 00:00:00 2001 From: Stephen Zhou <38493346+hyoban@users.noreply.github.com> Date: Tue, 19 Nov 2024 17:32:21 +0800 Subject: [PATCH] Revert "perf: reduce the number of items rendered on the first render" close #1659 This reverts commit 6704d61baac7f54368cedc0438845aaacfb98960. --- apps/renderer/src/modules/entry-column/index.tsx | 11 ----------- 1 file changed, 11 deletions(-) diff --git a/apps/renderer/src/modules/entry-column/index.tsx b/apps/renderer/src/modules/entry-column/index.tsx index f55bffabd5..47d7681c1e 100644 --- a/apps/renderer/src/modules/entry-column/index.tsx +++ b/apps/renderer/src/modules/entry-column/index.tsx @@ -44,15 +44,6 @@ const scrollSeekConfiguration: ScrollSeekConfiguration = { exit: (velocity) => Math.abs(velocity) < 1000, } -const INITIAL_ITEM_COUNTS = { - [FeedViewType.Articles]: 10, - [FeedViewType.Pictures]: 20, - [FeedViewType.Videos]: 20, - [FeedViewType.SocialMedia]: 5, - [FeedViewType.Notifications]: 10, - [FeedViewType.Audios]: 10, -} - export type VirtuosoComponentProps = { onlyShowArchivedButton: boolean } type VirtuosoComponentPropsContext = { context?: VirtuosoComponentProps } @@ -148,10 +139,8 @@ function EntryColumnImpl() { const scrollRef = useRef(null) const virtuosoOptions = { - initialItemCount: INITIAL_ITEM_COUNTS[view], components: { List: EntryListContent, - Footer: useCallback( ({ context }: VirtuosoComponentPropsContext) => { if (!isFetchingNextPage) {