mirror of
https://github.com/JustinZeus/Wholphin.git
synced 2026-07-09 08:01:20 +02:00
Fix two UI issues (#856)
## Description Fixes UI issues: - Showing unplayed corner text on multi-part movies - Fix duplicate or missing rating info on discover movie & series pages ### Related issues N/A ### Testing Emulator ## Screenshots N/A ## AI or LLM usage None
This commit is contained in:
parent
6ec10b9b82
commit
6954d821ed
5 changed files with 28 additions and 23 deletions
|
|
@ -167,19 +167,19 @@ fun listToDotString(
|
|||
strings.forEachIndexed { index, string ->
|
||||
append(string)
|
||||
if (index != strings.lastIndex) dot()
|
||||
communityRating?.let {
|
||||
dot()
|
||||
append(String.format(Locale.getDefault(), "%.1f", it))
|
||||
appendInlineContent(id = "star")
|
||||
}
|
||||
criticRating?.let {
|
||||
dot()
|
||||
append("${it.toInt()}%")
|
||||
if (it >= 60f) {
|
||||
appendInlineContent(id = "fresh")
|
||||
} else {
|
||||
appendInlineContent(id = "rotten")
|
||||
}
|
||||
}
|
||||
communityRating?.let {
|
||||
dot()
|
||||
append(String.format(Locale.getDefault(), "%.1f", it))
|
||||
appendInlineContent(id = "star")
|
||||
}
|
||||
criticRating?.let {
|
||||
dot()
|
||||
append("${it.toInt()}%")
|
||||
if (it >= 60f) {
|
||||
appendInlineContent(id = "fresh")
|
||||
} else {
|
||||
appendInlineContent(id = "rotten")
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -65,7 +65,7 @@ fun DiscoverMovieDetailsHeader(
|
|||
) {
|
||||
val padding = 4.dp
|
||||
val details =
|
||||
remember(movie) {
|
||||
remember(movie, rating) {
|
||||
buildList {
|
||||
movie.releaseDate?.let(::add)
|
||||
movie.runtime
|
||||
|
|
@ -89,6 +89,7 @@ fun DiscoverMovieDetailsHeader(
|
|||
?.releaseDates
|
||||
?.firstOrNull()
|
||||
?.certification
|
||||
?.takeIf { it.isNotNullOrBlank() }
|
||||
?.let(::add)
|
||||
}.let {
|
||||
listToDotString(
|
||||
|
|
|
|||
|
|
@ -463,7 +463,7 @@ fun DiscoverSeriesDetailsHeader(
|
|||
) {
|
||||
val padding = 4.dp
|
||||
val details =
|
||||
remember(series) {
|
||||
remember(series, rating) {
|
||||
buildList {
|
||||
series.firstAirDate?.let(::add)
|
||||
series.episodeRunTime
|
||||
|
|
|
|||
|
|
@ -326,7 +326,7 @@ fun HomePageContent(
|
|||
name = item?.data?.seriesName ?: item?.name,
|
||||
item = item,
|
||||
aspectRatio = AspectRatios.TALL,
|
||||
cornerText = item?.ui?.episdodeUnplayedCornerText,
|
||||
cornerText = item?.ui?.episodeUnplayedCornerText,
|
||||
played = item?.data?.userData?.played ?: false,
|
||||
favorite = item?.favorite ?: false,
|
||||
playPercent =
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue