diff --git a/app/src/main/java/cc/skysparkle/fogwave/ui/components/StationLogo.kt b/app/src/main/java/cc/skysparkle/fogwave/ui/components/StationLogo.kt index 42acd31..3e8f9ef 100644 --- a/app/src/main/java/cc/skysparkle/fogwave/ui/components/StationLogo.kt +++ b/app/src/main/java/cc/skysparkle/fogwave/ui/components/StationLogo.kt @@ -1,12 +1,10 @@ package cc.skysparkle.fogwave.ui.components -import androidx.compose.foundation.Image import androidx.compose.runtime.Composable import androidx.compose.runtime.ReadOnlyComposable import androidx.compose.ui.Modifier import androidx.compose.ui.graphics.Color import androidx.compose.ui.layout.ContentScale -import androidx.compose.ui.res.painterResource import cc.skysparkle.fogwave.data.model.RadioStation import cc.skysparkle.fogwave.ui.theme.LocalGeoColors import coil.compose.AsyncImage @@ -19,7 +17,9 @@ private val LightLogoBackdrop = Color(0xFFECE8F1) fun stationTileColor(station: RadioStation): Color = if (station.lightBackdrop) LightLogoBackdrop else LocalGeoColors.current.surfaceContainer -// Station list logos. +// Every logo goes through Coil with the size of the box it sits in. Logos live in drawable-nodpi, and a +// full-size decode (painterResource, or Coil with Size.ORIGINAL) leaves them blank or a few pixels wide +// in release builds, so the mini player and the now-playing sheet load them exactly like the station list. @Composable fun StationLogoImage(station: RadioStation, modifier: Modifier = Modifier) { AsyncImage( @@ -30,13 +30,7 @@ fun StationLogoImage(station: RadioStation, modifier: Modifier = Modifier) { ) } -// Mini player, now-playing sheet and its station lists. @Composable fun StationArtwork(station: RadioStation, modifier: Modifier = Modifier) { - Image( - painter = painterResource(id = station.iconResId), - contentDescription = null, - contentScale = ContentScale.Crop, - modifier = modifier - ) + StationLogoImage(station, modifier) }