diff options
Diffstat (limited to 'src/state/queries/notifications/feed.ts')
-rw-r--r-- | src/state/queries/notifications/feed.ts | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/src/state/queries/notifications/feed.ts b/src/state/queries/notifications/feed.ts index 82eda06ea..dc206df79 100644 --- a/src/state/queries/notifications/feed.ts +++ b/src/state/queries/notifications/feed.ts @@ -114,7 +114,13 @@ export function useNotificationFeedQuery(opts?: {enabled?: boolean}) { count += page.items.length } - if (!isFetching && hasNextPage && count < PAGE_SIZE && numEmpties < 3) { + if ( + !isFetching && + hasNextPage && + count < PAGE_SIZE && + numEmpties < 3 && + (data?.pages.length || 0) < 6 + ) { query.fetchNextPage() } }, [query]) |