NuvioStreaming/patch4.diff
harrydbarnes 074cbfe864 feat: Add local filters to Trakt Library view all screen
- 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.
2026-05-02 18:49:28 +00:00

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()
}