diff --git a/src/components/core/grids/GridResults.svelte b/src/components/core/grids/GridResults.svelte index d7e14f0..1bcb3cb 100644 --- a/src/components/core/grids/GridResults.svelte +++ b/src/components/core/grids/GridResults.svelte @@ -61,11 +61,10 @@ $selectedSteamGridGameId = sgdbGameId; }); } else { - handleLoadOnScroll(); - isLoading = false; + handleLoadOnScroll().then(() => { + isLoading = false; + }); } - } else { - isLoading = false; } }); @@ -90,7 +89,7 @@ {:else}
{/if} {/if} diff --git a/src/components/core/grids/Grids.svelte b/src/components/core/grids/Grids.svelte index 33f170e..e95b18a 100644 --- a/src/components/core/grids/Grids.svelte +++ b/src/components/core/grids/Grids.svelte @@ -18,6 +18,7 @@ let windowWidth: number; let skipUpdate = false; + let selectedAppIdUnsub: Unsubscriber; let steamGridSearchCacheUnsub: Unsubscriber; let manualGamesUnsub: Unsubscriber; let customGameNamesUnsub: Unsubscriber; @@ -130,6 +131,11 @@ } }); + selectedAppIdUnsub = selectedGameAppId.subscribe(() => { + availableSteamGridGames = [ { label: "None", data: "None" } ]; + $selectedSteamGridGameId = "None"; + }) + selectedPlatformUnsub = currentPlatform.subscribe((platform) => { resetGridStores(); }); @@ -139,6 +145,7 @@ }); onDestroy(() => { + if (selectedAppIdUnsub) selectedAppIdUnsub(); if (steamGridSearchCacheUnsub) steamGridSearchCacheUnsub(); if (manualGamesUnsub) manualGamesUnsub(); if (customGameNamesUnsub) customGameNamesUnsub();