fix(stores): show the itch.io browse grid on the default filters (#2918)

The Itch tab only showed the browse grid after a filter had been
changed. On the default filters it fell back to the old shelves page
(What's New, Deals, Free Games, Trending), so the first thing people saw
was the pre-overhaul layout.

- The Itch tab now always shows the browse grid, like Game Jolt
- On the default filters it loads itch.io/games, itch's own default
Popular page
- The first page loads as soon as the tab opens, and the filters narrow
it from there
- Searching and the other stores are unchanged
This commit is contained in:
FX1922 authored and GitHub committed 2026-11-20 09:05:47 +03:00
commit 3f5280412d
2 files changed
+3 -5

No files matched your search

@@ -129,8 +129,6 @@ internal object ItchBrowseState {
private var next = 1
private var generation = 0
val active: Boolean get() = !query.isDefault
fun choose(context: Context, wanted: BrowseQuery) {
if (wanted == query) return
generation++
@@ -140,11 +138,11 @@ internal object ItchBrowseState {
failed = false
loading = false
next = 1
if (active) more(context)
more(context)
}
fun more(context: Context, retry: Boolean = false) {
if (loading || ended || !active || (failed && !retry)) return
if (loading || ended || (failed && !retry)) return
loading = true
failed = false
val app = context.applicationContext
@@ -665,7 +665,7 @@ private fun Storefront(
LaunchedEffect(store, q) { StoresState.search(ctx, store, q) }
val gameJolt = store == Store.GAMEJOLT
LaunchedEffect(gameJolt, s.storesShowMature) { if (gameJolt) GameJoltBrowseState.sync(ctx, s.storesShowMature) }
val browsing = q.isEmpty() && ((store == Store.ITCH && ItchBrowseState.active) || gameJolt)
val browsing = q.isEmpty() && (store == Store.ITCH || gameJolt)
val browseItems = if (!browsing) emptyList() else if (gameJolt) GameJoltBrowseState.items else ItchBrowseState.items
val catalog = store == Store.BATTLENET && q.isEmpty()
val visible = remember(found, library, shelves, q, s.storesShowMature, browsing, browseItems, catalog) {