mirror of
https://github.com/cheeaun/phanpy.git
synced 2025-02-08 17:16:25 +01: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);
|
setNearReachStart(nearReachStart);
|
||||||
if (reachStart) {
|
if (reachStart) {
|
||||||
loadItems(true);
|
loadItems(true);
|
||||||
} else if (nearReachEnd || (reachEnd && showMore)) {
|
|
||||||
loadItems();
|
|
||||||
}
|
}
|
||||||
|
// else if (nearReachEnd || (reachEnd && showMore)) {
|
||||||
|
// loadItems();
|
||||||
|
// }
|
||||||
},
|
},
|
||||||
[],
|
[],
|
||||||
);
|
);
|
||||||
|
@ -451,6 +452,8 @@ function Timeline({
|
||||||
{uiState === 'default' &&
|
{uiState === 'default' &&
|
||||||
(showMore ? (
|
(showMore ? (
|
||||||
<InView
|
<InView
|
||||||
|
root={scrollableRef.current}
|
||||||
|
rootMargin={Math.max(screen.width, screen.height) + 'px'}
|
||||||
onChange={(inView) => {
|
onChange={(inView) => {
|
||||||
if (inView) {
|
if (inView) {
|
||||||
loadItems();
|
loadItems();
|
||||||
|
|
Loading…
Reference in a new issue