mirror of
https://github.com/zoriya/Kyoo.git
synced 2025-05-24 02:02:36 -04:00
Make infinite scroll fetch earlier
This commit is contained in:
parent
bab97fba5f
commit
83877d8dab
@ -67,7 +67,8 @@ const InfiniteScroll = <Props,>({
|
||||
const offset =
|
||||
layout.layout === "horizontal" ? ref.current.offsetWidth : ref.current.offsetHeight;
|
||||
|
||||
if (scroll <= offset * 1.2) loadMore();
|
||||
// Load more if less than 3 element's worth of scroll is left
|
||||
if (scroll <= offset * 3) loadMore();
|
||||
}, [hasMore, isFetching, layout, loadMore, fetchMore]);
|
||||
const scrollProps = { ref, onScroll };
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user