Don't need nearReachEnd, use InView more

pull/383/head
Lim Chee Aun 2024-01-02 12:24:03 +08:00
rodzic cf52e0776e
commit 0ebbc5b34e
1 zmienionych plików z 5 dodań i 2 usunięć

Wyświetl plik

@ -239,9 +239,10 @@ function Timeline({
setNearReachStart(nearReachStart);
if (reachStart) {
loadItems(true);
} else if (nearReachEnd || (reachEnd && showMore)) {
loadItems();
}
// else if (nearReachEnd || (reachEnd && showMore)) {
// loadItems();
// }
},
[],
);
@ -451,6 +452,8 @@ function Timeline({
{uiState === 'default' &&
(showMore ? (
<InView
root={scrollableRef.current}
rootMargin={Math.max(screen.width, screen.height) + 'px'}
onChange={(inView) => {
if (inView) {
loadItems();