mirror of
https://github.com/rommapp/romm.git
synced 2026-06-28 23:06:11 +00:00
avoid overlapped fetch
This commit is contained in:
@@ -70,7 +70,7 @@ async function scan() {
|
||||
}
|
||||
|
||||
async function fetchMoreSearch() {
|
||||
if (searchCursor.value === null) return;
|
||||
if (searchCursor.value === null || gettingRoms.value) return;
|
||||
|
||||
gettingRoms.value = true;
|
||||
await fetchRomsApi({ platform: route.params.platform, cursor: searchCursor.value, searchTerm: filter.value })
|
||||
@@ -100,7 +100,7 @@ function onFilterChange() {
|
||||
}
|
||||
|
||||
async function fetchMoreRoms(platform) {
|
||||
if (cursor.value === null) return;
|
||||
if (cursor.value === null || gettingRoms.value) return;
|
||||
|
||||
gettingRoms.value = true;
|
||||
await fetchRomsApi({ platform, cursor: cursor.value })
|
||||
|
||||
Reference in New Issue
Block a user