mirror of
https://github.com/owenlejeune/TVTime.git
synced 2025-11-08 12:42:44 -05:00
TVT-50: Additional Detail TV Items
This commit is contained in:
@@ -727,7 +727,9 @@ private fun AdditionalDetailsCard(
|
||||
subtext = mi.productionCountries.joinToString(separator = ", ") { it.name },
|
||||
)
|
||||
if (type == MediaViewType.MOVIE) {
|
||||
AdditionalMovieItems(movie = mi as DetailedMovie)
|
||||
AdditionalTvItems(movie = mi as DetailedMovie)
|
||||
} else {
|
||||
AdditionalTvItems(tv = mi as DetailedTv)
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -735,7 +737,7 @@ private fun AdditionalDetailsCard(
|
||||
}
|
||||
|
||||
@Composable
|
||||
private fun AdditionalMovieItems(
|
||||
private fun AdditionalTvItems(
|
||||
movie: DetailedMovie
|
||||
) {
|
||||
AdditionalDetailItem(
|
||||
@@ -756,6 +758,49 @@ private fun AdditionalMovieItems(
|
||||
}
|
||||
}
|
||||
|
||||
@Composable
|
||||
private fun AdditionalTvItems(
|
||||
tv: DetailedTv
|
||||
) {
|
||||
AdditionalDetailItem(
|
||||
title = stringResource(R.string.created_by_title),
|
||||
subtext = tv.createdBy.joinToString(separator = ", ") { it.name }
|
||||
)
|
||||
AdditionalDetailItem(
|
||||
title = stringResource(R.string.in_production_title),
|
||||
subtext = if (tv.inProduction) {
|
||||
stringResource(R.string.in_production_state)
|
||||
} else {
|
||||
stringResource(R.string.ended_state)
|
||||
}
|
||||
)
|
||||
AdditionalDetailItem(
|
||||
title = stringResource(R.string.networks_title),
|
||||
subtext = tv.networks.joinToString(separator = ", ") { it.name }
|
||||
)
|
||||
AdditionalDetailItem(
|
||||
title = stringResource(R.string.number_of_episodes_title),
|
||||
subtext = tv.numberOfEpisodes.toString()
|
||||
)
|
||||
AdditionalDetailItem(
|
||||
title = stringResource(R.string.number_of_seasons_title),
|
||||
subtext = tv.numberOfSeasons.toString()
|
||||
)
|
||||
AdditionalDetailItem(
|
||||
title = stringResource(R.string.last_episode_to_air_title),
|
||||
subtext = "#${tv.lastEpisodeToAir.episodeNumber} ${tv.lastEpisodeToAir.name}"
|
||||
)
|
||||
AdditionalDetailItem(
|
||||
title = stringResource(R.string.original_country_title),
|
||||
subtext = tv.originCountry.joinToString(separator = ", ")
|
||||
)
|
||||
AdditionalDetailItem(
|
||||
title = stringResource(R.string.tv_type_title),
|
||||
subtext = tv.type,
|
||||
includeDivider = false
|
||||
)
|
||||
}
|
||||
|
||||
@Composable
|
||||
private fun AdditionalDetailItem(
|
||||
title: String,
|
||||
|
||||
@@ -163,4 +163,14 @@
|
||||
<string name="movie_budget_title">Budget</string>
|
||||
<string name="movie_revenue_title">Revenue</string>
|
||||
<string name="movie_collection_title">Collection</string>
|
||||
<string name="created_by_title">Created By</string>
|
||||
<string name="in_production_title">In Production</string>
|
||||
<string name="networks_title">Networks</string>
|
||||
<string name="in_production_state">In Production</string>
|
||||
<string name="ended_state">Ended</string>
|
||||
<string name="number_of_episodes_title">Number of Episodes</string>
|
||||
<string name="number_of_seasons_title">Number of Seasons</string>
|
||||
<string name="last_episode_to_air_title">Last Episode to Air</string>
|
||||
<string name="original_country_title">Original Country</string>
|
||||
<string name="tv_type_title">Type</string>
|
||||
</resources>
|
||||
Reference in New Issue
Block a user