Skip to content

Commit

Permalink
[Jetcaster] Podcast details - adjusting spacing and show episode summ…
Browse files Browse the repository at this point in the history
…ary. (#1367)
  • Loading branch information
arriolac authored Apr 26, 2024
2 parents 30137d2 + 2877563 commit 2a0be09
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -181,7 +181,8 @@ fun PodcastDetailsContent(
onClick = navigateToPlayer,
onQueueEpisode = onQueueEpisode,
modifier = Modifier.fillMaxWidth(),
showPodcastImage = false
showPodcastImage = false,
showSummary = true
)
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,7 @@ fun EpisodeListItem(
onQueueEpisode: (PlayerEpisode) -> Unit,
modifier: Modifier = Modifier,
showPodcastImage: Boolean = true,
showSummary: Boolean = false,
) {
Box(modifier = modifier.padding(vertical = 8.dp, horizontal = 16.dp)) {
Surface(
Expand All @@ -90,7 +91,8 @@ fun EpisodeListItem(
episode = episode,
podcast = podcast,
showPodcastImage = showPodcastImage,
modifier = Modifier.padding(bottom = 4.dp)
showSummary = showSummary,
modifier = Modifier.padding(bottom = 8.dp)
)

// Bottom Part
Expand Down Expand Up @@ -183,10 +185,11 @@ private fun EpisodeListItemFooter(
}

@Composable
fun EpisodeListItemHeader(
private fun EpisodeListItemHeader(
episode: EpisodeInfo,
podcast: PodcastInfo,
showPodcastImage: Boolean,
showSummary: Boolean,
modifier: Modifier = Modifier
) {
Row(modifier = modifier) {
Expand All @@ -199,16 +202,16 @@ fun EpisodeListItemHeader(
Text(
text = episode.title,
maxLines = 2,
minLines = 2,
minLines = 1,
overflow = TextOverflow.Ellipsis,
style = MaterialTheme.typography.titleMedium,
modifier = Modifier.padding(vertical = 8.dp)
modifier = Modifier.padding(vertical = 2.dp)
)

Text(
text = podcast.title,
text = if (showSummary) episode.summary else podcast.title,
maxLines = 2,
minLines = 2,
minLines = 1,
overflow = TextOverflow.Ellipsis,
style = MaterialTheme.typography.titleSmall,
)
Expand Down Expand Up @@ -261,7 +264,8 @@ private fun EpisodeListItemPreview() {
episode = PreviewEpisodes[0],
podcast = PreviewPodcasts[0],
onClick = {},
onQueueEpisode = {}
onQueueEpisode = {},
showSummary = true
)
}
}
Expand Down

0 comments on commit 2a0be09

Please sign in to comment.