diff --git a/composeApp/src/commonMain/composeResources/values-pl/strings.xml b/composeApp/src/commonMain/composeResources/values-pl/strings.xml
index 012ba9ae2..08322b6ff 100644
--- a/composeApp/src/commonMain/composeResources/values-pl/strings.xml
+++ b/composeApp/src/commonMain/composeResources/values-pl/strings.xml
@@ -589,6 +589,9 @@
Sortuj wszystkie elementy według czasu
Styl streamingowy
Wydane najpierw, nadchodzące na końcu
+ Oddzielny rząd Nadchodzące
+ Przenieś niewydane odcinki do oddzielnego rzędu Nadchodzące
+ Nadchodzące
STYL KARTY
PRZY URUCHOMIENIU
ZACHOWANIE NASTĘPNEGO
diff --git a/composeApp/src/commonMain/composeResources/values/strings.xml b/composeApp/src/commonMain/composeResources/values/strings.xml
index 34744803e..a69a6ef78 100644
--- a/composeApp/src/commonMain/composeResources/values/strings.xml
+++ b/composeApp/src/commonMain/composeResources/values/strings.xml
@@ -681,6 +681,9 @@
Sort all items by recency
Streaming Style
Released items first, upcoming at the end
+ Separate Upcoming Row
+ Move unaired episodes to a separate Upcoming row
+ Upcoming
Poster Card Style
ON LAUNCH
NEXT UP BEHAVIOR
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 31676eee1..af37817bd 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
@@ -3,6 +3,8 @@ package com.nuvio.app.features.home
import androidx.compose.foundation.layout.BoxWithConstraints
import androidx.compose.foundation.layout.fillMaxSize
import androidx.compose.foundation.layout.padding
+import androidx.compose.foundation.lazy.LazyListScope
+import androidx.compose.foundation.lazy.LazyListState
import androidx.compose.foundation.lazy.rememberLazyListState
import androidx.compose.runtime.Composable
import androidx.compose.runtime.LaunchedEffect
@@ -13,6 +15,7 @@ import androidx.compose.runtime.snapshotFlow
import androidx.compose.runtime.setValue
import androidx.compose.ui.Modifier
import androidx.compose.ui.input.nestedscroll.nestedScroll
+import androidx.compose.ui.unit.Dp
import androidx.compose.ui.unit.dp
import androidx.lifecycle.compose.collectAsStateWithLifecycle
import com.nuvio.app.core.auth.AuthRepository
@@ -45,6 +48,7 @@ import com.nuvio.app.features.home.components.HomeHeroSection
import com.nuvio.app.features.home.components.HomeSkeletonHero
import com.nuvio.app.features.home.components.HomeSkeletonRow
import com.nuvio.app.features.home.components.HomeContinueWatchingSectionBottomPadding
+import com.nuvio.app.features.home.components.ContinueWatchingLayout
import com.nuvio.app.features.trakt.TRAKT_CONTINUE_WATCHING_DAYS_CAP_ALL
import com.nuvio.app.features.trakt.TraktSettingsRepository
import com.nuvio.app.features.trakt.WatchProgressSource
@@ -58,11 +62,13 @@ import com.nuvio.app.features.watchprogress.CachedNextUpItem
import com.nuvio.app.features.watchprogress.ContinueWatchingEnrichmentCache
import com.nuvio.app.features.watchprogress.CurrentDateProvider
import com.nuvio.app.features.watchprogress.ContinueWatchingPreferencesRepository
+import com.nuvio.app.features.watchprogress.ContinueWatchingPreferencesUiState
import com.nuvio.app.features.watchprogress.ContinueWatchingItem
import com.nuvio.app.features.watchprogress.ContinueWatchingSortMode
import com.nuvio.app.features.watchprogress.isMalformedNextUpSeedContentId
import com.nuvio.app.features.watchprogress.isSeriesTypeForContinueWatching
import com.nuvio.app.features.watchprogress.nextUpDismissKey
+import com.nuvio.app.features.watchprogress.parseReleaseDateToEpochMs
import com.nuvio.app.features.watchprogress.resolvedProgressKey
import com.nuvio.app.features.watchprogress.shouldTreatAsInProgressForContinueWatching
import com.nuvio.app.features.watchprogress.shouldUseAsCompletedSeedForContinueWatching
@@ -132,6 +138,7 @@ fun HomeScreen(
}.collectAsStateWithLifecycle()
val homeListState = rememberLazyListState()
val continueWatchingListState = rememberLazyListState()
+ val upcomingListState = rememberLazyListState()
val collections by CollectionRepository.collections.collectAsStateWithLifecycle()
val continueWatchingPreferences by ContinueWatchingPreferencesRepository.uiState.collectAsStateWithLifecycle()
val watchedUiState by WatchedRepository.uiState.collectAsStateWithLifecycle()
@@ -286,6 +293,7 @@ fun HomeScreen(
val activeProfileId = profileState.activeProfile?.profileIndex ?: 1
val cwCacheGeneration by ContinueWatchingEnrichmentCache.generation.collectAsStateWithLifecycle()
var hasUserScrolledContinueWatching by remember(activeProfileId) { mutableStateOf(false) }
+ var hasUserScrolledUpcoming by remember(activeProfileId) { mutableStateOf(false) }
LaunchedEffect(activeProfileId, continueWatchingListState) {
snapshotFlow { continueWatchingListState.isScrollInProgress }.collect { isScrolling ->
@@ -293,6 +301,12 @@ fun HomeScreen(
}
}
+ LaunchedEffect(activeProfileId, upcomingListState) {
+ snapshotFlow { upcomingListState.isScrollInProgress }.collect { isScrolling ->
+ if (isScrolling) hasUserScrolledUpcoming = true
+ }
+ }
+
var nextUpItemsBySeries by remember(activeProfileId, effectiveWatchProgressSource) {
mutableStateOf