From 6c736ce596d0f92a0f11540594f3eb3e8dc801f0 Mon Sep 17 00:00:00 2001 From: tapframe <85391825+tapframe@users.noreply.github.com> Date: Mon, 1 Jun 2026 03:24:40 +0530 Subject: [PATCH] refactor: rearrange text display logic in ContinueWatchingCard --- .../components/HomeContinueWatchingSection.kt | 66 +++++++++---------- 1 file changed, 32 insertions(+), 34 deletions(-) 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 e608debf1..99f36172d 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 @@ -656,47 +656,45 @@ private fun ContinueWatchingCard( contentScale = ContentScale.Crop, ) } - if (!posterCardStyle.hideLabelsEnabled) { - Column( - modifier = Modifier - .align(Alignment.BottomStart) - .padding(cardMetrics.contentPadding), - verticalArrangement = Arrangement.spacedBy(cardMetrics.textGap), - ) { - if (episodeCode != null) { - Text( - text = episodeCode, - style = MaterialTheme.typography.labelMedium.copy( - fontSize = cardMetrics.metaTextSize, - fontWeight = FontWeight.SemiBold, - ), - color = MaterialTheme.colorScheme.onBackground, - maxLines = 1, - overflow = TextOverflow.Ellipsis, - ) - } + Column( + modifier = Modifier + .align(Alignment.BottomStart) + .padding(cardMetrics.contentPadding), + verticalArrangement = Arrangement.spacedBy(cardMetrics.textGap), + ) { + if (episodeCode != null) { Text( - text = item.title, - style = MaterialTheme.typography.titleSmall.copy( - fontSize = cardMetrics.titleTextSize, + text = episodeCode, + style = MaterialTheme.typography.labelMedium.copy( + fontSize = cardMetrics.metaTextSize, fontWeight = FontWeight.SemiBold, ), color = MaterialTheme.colorScheme.onBackground, maxLines = 1, overflow = TextOverflow.Ellipsis, ) - if (episodeTitle != null) { - Text( - text = episodeTitle, - style = MaterialTheme.typography.bodySmall.copy( - fontSize = cardMetrics.metaTextSize, - fontWeight = FontWeight.Medium, - ), - color = MaterialTheme.colorScheme.onBackground.copy(alpha = 0.72f), - maxLines = 1, - overflow = TextOverflow.Ellipsis, - ) - } + } + Text( + text = item.title, + style = MaterialTheme.typography.titleSmall.copy( + fontSize = cardMetrics.titleTextSize, + fontWeight = FontWeight.SemiBold, + ), + color = MaterialTheme.colorScheme.onBackground, + maxLines = 1, + overflow = TextOverflow.Ellipsis, + ) + if (episodeTitle != null) { + Text( + text = episodeTitle, + style = MaterialTheme.typography.bodySmall.copy( + fontSize = cardMetrics.metaTextSize, + fontWeight = FontWeight.Medium, + ), + color = MaterialTheme.colorScheme.onBackground.copy(alpha = 0.72f), + maxLines = 1, + overflow = TextOverflow.Ellipsis, + ) } } Box(