From 430445fe69d6871d5cfeb35a8d47adbceec5a1fc Mon Sep 17 00:00:00 2001 From: tapframe <85391825+tapframe@users.noreply.github.com> Date: Sun, 29 Mar 2026 13:59:38 +0530 Subject: [PATCH] feat: Enhance Continue Watching card metadata; display episode information and titles conditionally --- .../components/HomeContinueWatchingSection.kt | 21 ++++++++++++++++++- 1 file changed, 20 insertions(+), 1 deletion(-) diff --git a/composeApp/src/commonMain/kotlin/com/nuvio/app/features/home/components/HomeContinueWatchingSection.kt b/composeApp/src/commonMain/kotlin/com/nuvio/app/features/home/components/HomeContinueWatchingSection.kt index 48a5e74cb..9eaadf55d 100644 --- a/composeApp/src/commonMain/kotlin/com/nuvio/app/features/home/components/HomeContinueWatchingSection.kt +++ b/composeApp/src/commonMain/kotlin/com/nuvio/app/features/home/components/HomeContinueWatchingSection.kt @@ -216,6 +216,13 @@ private fun ContinueWatchingWideCard( .padding(layout.wideContentPadding), verticalArrangement = Arrangement.SpaceBetween, ) { + val isEpisodeCard = item.seasonNumber != null && item.episodeNumber != null + val hasEpisodeTitle = !item.episodeTitle.isNullOrBlank() + val wideMetaLine = when { + item.progressFraction <= 0f && isEpisodeCard -> "Up Next • S${item.seasonNumber}E${item.episodeNumber}" + isEpisodeCard -> "S${item.seasonNumber}E${item.episodeNumber}" + else -> item.subtitle + } Column(verticalArrangement = Arrangement.spacedBy(6.dp)) { Row( modifier = Modifier.fillMaxWidth(), @@ -238,7 +245,7 @@ private fun ContinueWatchingWideCard( } } Text( - text = item.subtitle, + text = wideMetaLine, style = MaterialTheme.typography.bodySmall.copy( fontSize = layout.wideMetaSize, fontWeight = FontWeight.Medium, @@ -247,6 +254,18 @@ private fun ContinueWatchingWideCard( maxLines = 1, overflow = TextOverflow.Ellipsis, ) + if (hasEpisodeTitle) { + Text( + text = item.episodeTitle.orEmpty(), + style = MaterialTheme.typography.bodySmall.copy( + fontSize = layout.wideMetaSize, + fontWeight = FontWeight.Medium, + ), + color = MaterialTheme.colorScheme.onSurfaceVariant, + maxLines = 1, + overflow = TextOverflow.Ellipsis, + ) + } } if (item.progressFraction > 0f) {