mirror of
https://github.com/JustinZeus/Wholphin.git
synced 2026-07-08 23:51:21 +02:00
Add temp indicators
This commit is contained in:
parent
8f02dab6ed
commit
bb55dc744a
1 changed files with 25 additions and 0 deletions
|
|
@ -33,6 +33,7 @@ import androidx.tv.material3.CardDefaults
|
|||
import androidx.tv.material3.Text
|
||||
import com.github.damontecres.wholphin.R
|
||||
import com.github.damontecres.wholphin.data.model.DiscoverItem
|
||||
import com.github.damontecres.wholphin.data.model.SeerrAvailability
|
||||
import com.github.damontecres.wholphin.data.model.SeerrItemType
|
||||
import com.github.damontecres.wholphin.ui.AspectRatios
|
||||
import com.github.damontecres.wholphin.ui.Cards
|
||||
|
|
@ -105,6 +106,30 @@ fun DiscoverItemCard(
|
|||
Modifier
|
||||
.fillMaxSize(),
|
||||
)
|
||||
val availabilityColor =
|
||||
when (item?.availability) {
|
||||
SeerrAvailability.PENDING,
|
||||
SeerrAvailability.PROCESSING,
|
||||
-> Color.Yellow
|
||||
|
||||
SeerrAvailability.PARTIALLY_AVAILABLE,
|
||||
SeerrAvailability.AVAILABLE,
|
||||
-> Color.Green
|
||||
|
||||
else -> null
|
||||
}
|
||||
availabilityColor?.let {
|
||||
Box(
|
||||
modifier =
|
||||
Modifier
|
||||
.padding(4.dp)
|
||||
.background(
|
||||
color = it,
|
||||
shape = CircleShape,
|
||||
).size(12.dp)
|
||||
.align(Alignment.TopEnd),
|
||||
)
|
||||
}
|
||||
if (showOverlay) {
|
||||
// TODO better colors
|
||||
val color =
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue