mirror of
https://github.com/tapframe/NuvioStreaming.git
synced 2026-05-16 23:12:12 +00:00
- Added "All", "Movies", and "Series" FilterChips to the `CatalogHeader`. - Computed `filteredItems` to apply filtering for the Trakt Library screen based on the item type (movies vs series/tv). - Applied Material Theme `FilterChipDefaults` properties to ensure accurate theming. - Filter out aggressive loading of next pages if a filter other than 'All' is currently selected to avoid consecutive requests for missing data matching conditions.
12 lines
693 B
Diff
12 lines
693 B
Diff
--- composeApp/src/commonMain/kotlin/com/nuvio/app/features/catalog/CatalogScreen.kt
|
|
+++ composeApp/src/commonMain/kotlin/com/nuvio/app/features/catalog/CatalogScreen.kt
|
|
@@ -107,7 +107,7 @@
|
|
val lastVisible = layoutInfo.visibleItemsInfo.lastOrNull()?.index ?: -1
|
|
lastVisible >= layoutInfo.totalItemsCount - 6
|
|
}
|
|
.distinctUntilChanged()
|
|
- .filter { it && uiState.canLoadMore && !uiState.isLoading }
|
|
+ .filter { it && uiState.canLoadMore && !uiState.isLoading && selectedFilter == 0 } // Prevent aggressive fetching when filtered
|
|
.collect {
|
|
CatalogRepository.loadMore()
|
|
}
|