aboutsummaryrefslogtreecommitdiffstats
path: root/apps/mobile
diff options
context:
space:
mode:
authorMohamedBassem <me@mbassem.com>2024-05-19 13:44:27 +0100
committerMohamedBassem <me@mbassem.com>2024-05-19 13:46:33 +0100
commite8b47751660e24a6bd24941b6cb6b0ee79ffad3c (patch)
treef59c11d3dae9698c4b6e2f824da8eab7e60427ec /apps/mobile
parentd1ad84be48bb3b6914c0d478d13f92861889c466 (diff)
downloadkarakeep-e8b47751660e24a6bd24941b6cb6b0ee79ffad3c.tar.zst
fix: Fix missing bookmarks during pagination if they got created in the same second. Fixes #140
Diffstat (limited to 'apps/mobile')
-rw-r--r--apps/mobile/components/bookmarks/UpdatingBookmarkList.tsx11
1 files changed, 7 insertions, 4 deletions
diff --git a/apps/mobile/components/bookmarks/UpdatingBookmarkList.tsx b/apps/mobile/components/bookmarks/UpdatingBookmarkList.tsx
index e69b5319..54288362 100644
--- a/apps/mobile/components/bookmarks/UpdatingBookmarkList.tsx
+++ b/apps/mobile/components/bookmarks/UpdatingBookmarkList.tsx
@@ -21,10 +21,13 @@ export default function UpdatingBookmarkList({
error,
fetchNextPage,
isFetchingNextPage,
- } = api.bookmarks.getBookmarks.useInfiniteQuery(query, {
- initialCursor: null,
- getNextPageParam: (lastPage) => lastPage.nextCursor,
- });
+ } = api.bookmarks.getBookmarks.useInfiniteQuery(
+ { ...query, useCursorV2: true },
+ {
+ initialCursor: null,
+ getNextPageParam: (lastPage) => lastPage.nextCursor,
+ },
+ );
if (error) {
return <Text>{JSON.stringify(error)}</Text>;