1
0
mirror of https://github.com/tooot-app/app synced 2025-06-05 22:19:13 +02:00

Simplify and improve pagination

This commit is contained in:
xmflsct
2023-01-07 18:01:08 +01:00
parent 44f8900902
commit 7db8b26dd9
12 changed files with 92 additions and 112 deletions

View File

@ -52,13 +52,7 @@ const Timeline: React.FC<Props> = ({
notifyOnChangeProps: Platform.select({
ios: ['dataUpdatedAt', 'isFetching'],
android: ['dataUpdatedAt', 'isFetching', 'isLoading']
}),
getNextPageParam: lastPage =>
lastPage?.links?.next && {
...(lastPage.links.next.isOffset
? { offset: lastPage.links.next.id }
: { max_id: lastPage.links.next.id })
}
})
}
})