From 9b538f324de93da6b80dd4cdf7ae36b4090e68e6 Mon Sep 17 00:00:00 2001 From: plebeius Date: Wed, 25 Feb 2026 19:16:00 +0800 Subject: [PATCH] perf(board): disable Virtuoso when single-board pagination is on --- src/views/board/board.tsx | 37 +++++++++++++++++++++++-------------- 1 file changed, 23 insertions(+), 14 deletions(-) diff --git a/src/views/board/board.tsx b/src/views/board/board.tsx index 14f85bd1..163ce7bc 100644 --- a/src/views/board/board.tsx +++ b/src/views/board/board.tsx @@ -350,20 +350,29 @@ const Board = ({ feedCacheKey, viewType, boardIdentifier: boardIdentifierProp, i )} - post?.cid || `post-${index}`} - itemContent={(index, post) => } - useWindowScroll={true} - components={footerComponents} - endReached={effectiveInfiniteScroll && hasMore ? loadMore : undefined} - ref={virtuosoRef} - restoreStateFrom={lastVirtuosoState} - initialScrollTop={lastVirtuosoState?.scrollTop} - /> + {effectiveInfiniteScroll ? ( + post?.cid || `post-${index}`} + itemContent={(index, post) => } + useWindowScroll={true} + components={footerComponents} + endReached={hasMore ? loadMore : undefined} + ref={virtuosoRef} + restoreStateFrom={lastVirtuosoState} + initialScrollTop={lastVirtuosoState?.scrollTop} + /> + ) : ( + <> + {displayFeed.map((post, index) => ( + + ))} + + + )} );