Add isFetching

This commit is contained in:
Eric Bailey
2023-11-14 11:22:35 -06:00
parent cd5352e53a
commit 8ad261aa50
+8 -1
View File
@@ -156,9 +156,16 @@ export const FeedsScreen = withAuthRequired(function FeedsScreenImpl(
setIsPTR(false)
}, [setIsPTR, refetchPopularFeeds])
const onEndReached = React.useCallback(() => {
if (isUserSearching || !hasNextPopularFeedsPage || popularFeedsError) return
if (
isPopularFeedsFetching ||
isUserSearching ||
!hasNextPopularFeedsPage ||
popularFeedsError
)
return
fetchNextPopularFeedsPage()
}, [
isPopularFeedsFetching,
isUserSearching,
popularFeedsError,
hasNextPopularFeedsPage,