From eacf726043a4adabf8b72f3f840ae6c96994749a Mon Sep 17 00:00:00 2001 From: Laura Hausmann Date: Thu, 23 Nov 2023 15:01:34 +0100 Subject: [PATCH] a --- packages/client/src/components/MkNotes.vue | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/packages/client/src/components/MkNotes.vue b/packages/client/src/components/MkNotes.vue index 59196f804..05724fe7a 100644 --- a/packages/client/src/components/MkNotes.vue +++ b/packages/client/src/components/MkNotes.vue @@ -71,18 +71,15 @@ defineExpose({ scrollTop, }); -const fetchedRecently = ref(false); +const lastFetchPos = ref(0); setInterval(() => { - if (!tlEl.value || fetchedRecently.value) return; + if (!tlEl.value) return; const viewport = document.documentElement.clientHeight; const left = document.documentElement.scrollHeight - document.documentElement.scrollTop; if (left <= viewport * 3) { pagingComponent.value.fetchMore(); - fetchedRecently.value = true; - setTimeout(() => { - fetchedRecently.value = false; - }, 500); + lastFetchPos.value = document.documentElement.scrollTop; } }, 100);