grid scroll fixed for smartphone

This commit is contained in:
zurdi
2023-07-31 17:32:53 +02:00
parent b76332b867
commit f39eccdd31

View File

@@ -129,9 +129,10 @@ function onGridScroll() {
if (cursor.value === null && searchCursor.value === null) return;
const { scrollTop, scrollHeight, clientHeight } = document.documentElement;
const scrollOffset = 60;
// If we are at the bottom of the page, fetch more roms
if (scrollTop + clientHeight >= scrollHeight) {
// If we are close at the bottom of the page, fetch more roms
if (scrollTop + clientHeight + scrollOffset >= scrollHeight) {
galleryFilter.value
? fetchMoreSearch()
: fetchMoreRoms(route.params.platform);