From e23c446bb7a4d20c0f82a5f9d7d6fca9d6c3fc21 Mon Sep 17 00:00:00 2001 From: Damontecres Date: Thu, 8 Oct 2026 09:51:26 -0400 Subject: [PATCH] Fix issue when scrolling on collection details page (#2048) ## Description If a collection is using separated types and there were 2+ empty rows between types, then the forward composition wouldn't trigger and the next row would not appear. In practice this means if you have a Collection that contained Movies and Videos, you might not be able to scroll down from Movies to Videos. The fix is to filter out the empty rows before composing. ### Related issues Fixes #2046 ### Testing Emulator ## Screenshots N/A ## AI or LLM usage None --- .../ui/detail/collection/CollectionViewModel.kt | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/app/src/main/java/com/github/damontecres/wholphin/ui/detail/collection/CollectionViewModel.kt b/app/src/main/java/com/github/damontecres/wholphin/ui/detail/collection/CollectionViewModel.kt index af3f3cfd..bdbb059a 100644 --- a/app/src/main/java/com/github/damontecres/wholphin/ui/detail/collection/CollectionViewModel.kt +++ b/app/src/main/java/com/github/damontecres/wholphin/ui/detail/collection/CollectionViewModel.kt @@ -244,12 +244,15 @@ class CollectionViewModel } jobs.forEach { job -> val (type, row) = job.await() - _state.update { - val separateItems = - it.separateItems.toMutableMap().apply { - put(type, row) - } - it.copy(separateItems = separateItems) + // Only include Success if non-empty + if (row !is HomeRowLoadingState.Success || row.items.isNotEmpty()) { + _state.update { + val separateItems = + it.separateItems.toMutableMap().apply { + put(type, row) + } + it.copy(separateItems = separateItems) + } } } }