fix(collections): preserve catalog genre filter on View All

The genre filter applied to a collection folder catalog was dropped when
opening View All. FolderDetailRepository.getCatalogSectionsForRows() built
HomeCatalogSection without carrying the tab's genre, and onCatalogClick did
not forward it to CatalogRoute, so the full-catalog screen loaded unfiltered.

Add a genre field to HomeCatalogSection, pass tab.genre when mapping folder
tabs to sections, and forward section.genre into CatalogRoute so the selected
genre filter is preserved through View All.

Fixes #1264
This commit is contained in:
DynamycSound 2026-06-07 22:57:55 +00:00
parent 09cb8f8277
commit ffb5797116
No known key found for this signature in database
3 changed files with 3 additions and 0 deletions

View file

@ -1191,6 +1191,7 @@ private fun MainAppContent(
type = section.type,
catalogId = section.catalogId,
supportsPagination = section.supportsPagination,
genre = section.genre,
),
)
}

View file

@ -421,6 +421,7 @@ object FolderDetailRepository {
items = tab.items,
availableItemCount = tab.items.size,
supportsPagination = tab.supportsPagination,
genre = tab.genre,
)
}
}

View file

@ -39,6 +39,7 @@ data class HomeCatalogSection(
val items: List<MetaPreview>,
val availableItemCount: Int = items.size,
val supportsPagination: Boolean = false,
val genre: String? = null,
)
fun HomeCatalogSection.canOpenCatalog(previewLimit: Int): Boolean =