mirror of
https://github.com/JustinZeus/Wholphin.git
synced 2026-07-08 23:51:21 +02:00
Fix a few discover UI bugs (#795)
## Description Just fixes a couple small UI issues on the discover/seerr pages
This commit is contained in:
parent
f787e9ce1a
commit
792d3598b7
3 changed files with 7 additions and 4 deletions
|
|
@ -56,7 +56,6 @@ import kotlin.contracts.contract
|
|||
import kotlin.coroutines.CoroutineContext
|
||||
import kotlin.math.min
|
||||
import kotlin.time.Duration
|
||||
import kotlin.time.Duration.Companion.milliseconds
|
||||
import kotlin.time.Duration.Companion.minutes
|
||||
import kotlin.time.Duration.Companion.seconds
|
||||
|
||||
|
|
@ -234,7 +233,7 @@ val Duration.roundMinutes: Duration
|
|||
* Rounds a [Duration] to nearest whole second
|
||||
*/
|
||||
val Duration.roundSeconds: Duration
|
||||
get() = (this + 30.milliseconds).inWholeSeconds.seconds
|
||||
get() = (this + .5.seconds).inWholeSeconds.seconds
|
||||
|
||||
/**
|
||||
* Gets the user's playback position as a [Duration]
|
||||
|
|
|
|||
|
|
@ -25,6 +25,7 @@ import com.github.damontecres.wholphin.preferences.UserPreferences
|
|||
import com.github.damontecres.wholphin.ui.components.GenreText
|
||||
import com.github.damontecres.wholphin.ui.components.OverviewText
|
||||
import com.github.damontecres.wholphin.ui.components.QuickDetails
|
||||
import com.github.damontecres.wholphin.ui.isNotNullOrBlank
|
||||
import com.github.damontecres.wholphin.ui.letNotEmpty
|
||||
import com.github.damontecres.wholphin.ui.listToDotString
|
||||
import com.github.damontecres.wholphin.ui.roundMinutes
|
||||
|
|
@ -103,7 +104,8 @@ fun DiscoverMovieDetailsHeader(
|
|||
GenreText(it, Modifier.padding(bottom = padding))
|
||||
}
|
||||
|
||||
movie.tagline?.let { tagline ->
|
||||
val tagline = remember { movie.tagline?.takeIf { it.isNotNullOrBlank() } }
|
||||
tagline?.let {
|
||||
Text(
|
||||
text = tagline,
|
||||
style = MaterialTheme.typography.bodyLarge,
|
||||
|
|
@ -134,8 +136,9 @@ fun DiscoverMovieDetailsHeader(
|
|||
remember(movie.credits?.crew) {
|
||||
movie.credits
|
||||
?.crew
|
||||
?.filter { it.job == "Directing" }
|
||||
?.filter { it.job == "Director" && it.name.isNotNullOrBlank() }
|
||||
?.joinToString(", ") { it.name!! }
|
||||
?.takeIf { it.isNotNullOrBlank() }
|
||||
}
|
||||
|
||||
directorName
|
||||
|
|
|
|||
|
|
@ -279,6 +279,7 @@ fun DestinationContent(
|
|||
}
|
||||
|
||||
SeerrItemType.PERSON -> {
|
||||
LaunchedEffect(Unit) { onClearBackdrop.invoke() }
|
||||
DiscoverPersonPage(
|
||||
person = destination.item,
|
||||
modifier = modifier,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue