Compare commits
1 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
95f8793938 |
@@ -12,8 +12,8 @@ android {
|
||||
applicationId = "dev.castarr.tv"
|
||||
minSdk = 26
|
||||
targetSdk = 35
|
||||
versionCode = 19
|
||||
versionName = "0.8.3"
|
||||
versionCode = 20
|
||||
versionName = "0.8.4"
|
||||
}
|
||||
|
||||
// Release signing from environment (see ~/.keys/castarr-release.env on the
|
||||
|
||||
@@ -337,24 +337,18 @@ private fun ChannelRow(
|
||||
}
|
||||
}
|
||||
|
||||
/** Channel logo in a small tile; initials while loading or without a logo. */
|
||||
/** Bare channel logo (they ship transparent); initials as fallback. */
|
||||
@Composable
|
||||
private fun LogoTile(channel: Channel) {
|
||||
val initials = channel.name.split(" ").filter { it.isNotBlank() }
|
||||
.take(2).map { it.first() }.joinToString("").uppercase()
|
||||
Box(
|
||||
Modifier
|
||||
.size(38.dp)
|
||||
.clip(RoundedCornerShape(8.dp))
|
||||
.background(CastarrColors.surfaceFocused),
|
||||
contentAlignment = Alignment.Center,
|
||||
) {
|
||||
Box(Modifier.size(width = 52.dp, height = 40.dp), contentAlignment = Alignment.Center) {
|
||||
if (channel.logo.isNotEmpty()) {
|
||||
SubcomposeAsyncImage(
|
||||
model = channel.logo,
|
||||
contentDescription = null,
|
||||
contentScale = ContentScale.Fit,
|
||||
modifier = Modifier.fillMaxSize().padding(5.dp),
|
||||
modifier = Modifier.fillMaxSize(),
|
||||
loading = { LogoInitials(initials) },
|
||||
error = { LogoInitials(initials) },
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user