From 008fc66ee4acff4f56abc918d57fc2952b6a3afe Mon Sep 17 00:00:00 2001 From: tapframe <85391825+tapframe@users.noreply.github.com> Date: Tue, 7 Apr 2026 15:16:40 +0530 Subject: [PATCH] fix:next up items filtering --- .../com/nuvio/app/features/home/HomeScreen.kt | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/composeApp/src/commonMain/kotlin/com/nuvio/app/features/home/HomeScreen.kt b/composeApp/src/commonMain/kotlin/com/nuvio/app/features/home/HomeScreen.kt index a2b866bf..1bced8f9 100644 --- a/composeApp/src/commonMain/kotlin/com/nuvio/app/features/home/HomeScreen.kt +++ b/composeApp/src/commonMain/kotlin/com/nuvio/app/features/home/HomeScreen.kt @@ -129,8 +129,19 @@ fun HomeScreen( }.toMap() } - val effectivNextUpItems = remember(nextUpItemsBySeries, cachedNextUpItems) { - if (nextUpItemsBySeries.isNotEmpty()) nextUpItemsBySeries else cachedNextUpItems + val effectivNextUpItems = remember( + nextUpItemsBySeries, + cachedNextUpItems, + continueWatchingPreferences.dismissedNextUpKeys, + ) { + val liveNextUpItems = nextUpItemsBySeries.filterValues { (_, item) -> + nextUpDismissKey( + item.parentMetaId, + item.nextUpSeedSeasonNumber, + item.nextUpSeedEpisodeNumber, + ) !in continueWatchingPreferences.dismissedNextUpKeys + } + if (liveNextUpItems.isNotEmpty()) liveNextUpItems else cachedNextUpItems } val continueWatchingItems = remember(