mirror of
https://github.com/cheeaun/phanpy.git
synced 2024-11-28 20:28:52 +03:00
Don't need nearReachEnd, use InView more
This commit is contained in:
parent
cf52e0776e
commit
0ebbc5b34e
1 changed files with 5 additions and 2 deletions
|
@ -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();
|
||||
|
|
Loading…
Reference in a new issue