mirror of
https://github.com/inaturalist/iNaturalistReactNative.git
synced 2026-05-01 20:23:04 -04:00
* remove assumed and undocumented meaning of page being zero from our use of
useInfiniteScroll in Explore; uses explicit type checks instead
* document byzantine pagination logic in useInfiniteExploreScroll
* fix broken infinite scroll when sorting by faves (was only showing first
page)
The underlying problem from 96c316a was setting initialPageParam to 1 in
useAuthenticatedInfiniteQuery, which seems rational, except
useInfiniteExploreScroll was using a false-ish value of page to detect when
it was requesting its first page. This does the same by being more explicit
about page's type without injecting undocumented meaning into the params we
hand to useInfiniteScroll.
* refactor: move Explore page param munging into unit tested helper
Closes MOB-400