[client] Further adjust timeline prefetch parameters

This commit is contained in:
Laura Hausmann 2023-11-24 00:33:34 +01:00
parent dc7d06ff74
commit d408bdd6aa
Signed by: zotan
GPG key ID: D044E84C5BE01605

View file

@ -66,7 +66,7 @@ function setTimer() {
interval.value = setInterval(() => {
const viewport = document.documentElement.clientHeight;
const left = document.documentElement.scrollHeight - document.documentElement.scrollTop;
if (left > Math.max(viewport * 3, 4000) || document.documentElement.scrollTop - lastFetchScrollTop.value < viewport) return;
if (left > Math.max(viewport * 3, viewport + 4000) || document.documentElement.scrollTop - lastFetchScrollTop.value < viewport) return;
pagingComponent.value.prefetchMore();
lastFetchScrollTop.value = document.documentElement.scrollTop;
}, 100);