mirror of
https://iceshrimp.dev/iceshrimp/iceshrimp
synced 2024-11-27 06:18:06 +09:00
hmm
This commit is contained in:
parent
082d9d8743
commit
818eb47663
@ -71,11 +71,19 @@ defineExpose({
|
||||
scrollTop,
|
||||
});
|
||||
|
||||
const fetchedRecently = ref(false);
|
||||
|
||||
setInterval(() => {
|
||||
if (!tlEl.value) return;
|
||||
if (!tlEl.value || fetchedRecently.value) return;
|
||||
const viewport = document.documentElement.clientHeight;
|
||||
const left = document.documentElement.scrollHeight - document.documentElement.scrollTop;
|
||||
if (left <= viewport * 3) pagingComponent.value.fetchMore();
|
||||
if (left <= viewport * 3) {
|
||||
pagingComponent.value.fetchMore();
|
||||
fetchedRecently.value = true;
|
||||
setTimeout(() => {
|
||||
fetchedRecently.value = false;
|
||||
}, 500);
|
||||
}
|
||||
}, 100);
|
||||
</script>
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user