scroll logic simplification

This commit is contained in:
jessop 2019-10-24 13:54:02 -04:00 committed by Sean Yesmunt
parent 08249c183e
commit 35605fc2b3
2 changed files with 7 additions and 7 deletions

View file

@ -69,14 +69,14 @@ export default function ClaimList(props: Props) {
x &&
mc &&
(window.scrollY + window.innerHeight >= x.offsetHeight ||
x.offsetHeight - mc.offsetHeight > PADDING_ALLOWANCE)
x.offsetHeight - mc.offsetHeight > PADDING_ALLOWANCE) &&
!loading &&
urisLength >= pageSize
) {
if (!loading && urisLength >= pageSize) {
onScrollBottom();
onScrollBottom();
// Save that we've fetched this page to avoid weird stuff happening with fast scrolling
setScrollBottomCbMap({ ...scrollBottomCbMap, [page]: true });
}
// Save that we've fetched this page to avoid weird stuff happening with fast scrolling
setScrollBottomCbMap({ ...scrollBottomCbMap, [page]: true });
}
}
}

View file

@ -845,4 +845,4 @@
"If you are having issues, checkout our %help% or email us at %email%.": "If you are having issues, checkout our %help% or email us at %email%.",
"Wrong password for %email%": "Wrong password for %email%",
"Legacy Licences": "Legacy Licences"
}
}