Bluesky app fork with some witchin' additions 💫

Fix: dont incorrectly mark a feed empty based only on the first page (#2298)

authored by

Paul Frazee and committed by
GitHub
28e0df59 2c37d47c

+4 -1
+4 -1
src/view/com/posts/Feed.tsx
··· 95 95 isFetchingNextPage, 96 96 fetchNextPage, 97 97 } = usePostFeedQuery(feed, feedParams, opts) 98 - const isEmpty = !isFetching && !data?.pages[0]?.slices.length 99 98 if (data?.pages[0]) { 100 99 lastFetchRef.current = data?.pages[0].fetchedAt 101 100 } 101 + const isEmpty = React.useMemo( 102 + () => !isFetching && !data?.pages?.some(page => page.slices.length), 103 + [isFetching, data], 104 + ) 102 105 103 106 const checkForNew = React.useCallback(async () => { 104 107 if (!data?.pages[0] || isFetching || !onHasNew || !enabled) {