feat(series): show season/episode context on play button and truncate subtitle

Enhance the series play button to display season and episode number alongside the play label when a next-up episode is available. Also constrain the subtitle text to a single line with ellipsis overflow to prevent layout issues from long subtitle strings.
This commit is contained in:
2026-06-20 17:42:03 +00:00
parent 1910a0c144
commit 8ac0fd0bd1
2 changed files with 8 additions and 1 deletions

View File

@@ -220,6 +220,8 @@ private fun ColumnScope.MediaDetailScaffoldContent(
color = scheme.onBackground,
fontSize = uiModel.subtitleFontSize,
fontWeight = uiModel.subtitleFontWeight,
maxLines = 1,
overflow = TextOverflow.Ellipsis,
modifier = modifier
)
}

View File

@@ -250,9 +250,14 @@ private fun Series.toMediaDetailScaffoldUiModel(
metadataItems = listOf(year, "$seasonCount Seasons"),
actions = selectedSeason?.let {
val seriesWatched = unwatchedEpisodeCount == 0
val playButtonText = mediaPlayButtonText(nextUpEpisode?.progress, nextUpEpisode?.watched)
MediaDetailActionsUiModel(
primaryAction = MediaDetailPrimaryActionUiModel(
text = mediaPlayButtonText(nextUpEpisode?.progress, nextUpEpisode?.watched),
text = if (nextUpEpisode != null) {
"$playButtonText S${it.index} • E${nextUpEpisode.index}"
} else {
playButtonText
},
progress = mediaPlaybackProgress(nextUpEpisode?.progress),
onClick = onPlayClick,
testTag = SeriesPlayButtonTag