mirror of
https://github.com/bitsocialnet/5chan.git
synced 2026-08-03 07:41:04 +02:00
perf(replies): prefer cached board preview replies (#1101)
* perf(replies): prefer cached board preview replies * fix(replies): address review feedback
This commit is contained in:
@@ -326,6 +326,8 @@ vi.mock('../../lib/utils/replies-preview-utils', () => ({
|
||||
filterRepliesForDisplay: (replies: TestComment[]) => replies,
|
||||
getPreviewDisplayReplies: (replies: TestComment[]) => replies,
|
||||
getTotalReplyCount: ({ replyCount }: { replyCount?: number }) => replyCount ?? 0,
|
||||
hasEnoughPreviewReplies: ({ replyCount, loadedCount, visibleCount }: { replyCount?: number; loadedCount: number; visibleCount: number }) =>
|
||||
loadedCount >= Math.min(visibleCount, replyCount ?? visibleCount),
|
||||
}));
|
||||
|
||||
vi.mock('../../lib/utils/thread-scroll-utils', () => ({
|
||||
|
||||
Reference in New Issue
Block a user