Bare, larger channel logos (no tile box)
Some checks failed
Build TV app / build (push) Failing after 3s
Some checks failed
Build TV app / build (push) Failing after 3s
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
@@ -12,8 +12,8 @@ android {
|
|||||||
applicationId = "dev.castarr.tv"
|
applicationId = "dev.castarr.tv"
|
||||||
minSdk = 26
|
minSdk = 26
|
||||||
targetSdk = 35
|
targetSdk = 35
|
||||||
versionCode = 19
|
versionCode = 20
|
||||||
versionName = "0.8.3"
|
versionName = "0.8.4"
|
||||||
}
|
}
|
||||||
|
|
||||||
// Release signing from environment (see ~/.keys/castarr-release.env on the
|
// 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
|
@Composable
|
||||||
private fun LogoTile(channel: Channel) {
|
private fun LogoTile(channel: Channel) {
|
||||||
val initials = channel.name.split(" ").filter { it.isNotBlank() }
|
val initials = channel.name.split(" ").filter { it.isNotBlank() }
|
||||||
.take(2).map { it.first() }.joinToString("").uppercase()
|
.take(2).map { it.first() }.joinToString("").uppercase()
|
||||||
Box(
|
Box(Modifier.size(width = 52.dp, height = 40.dp), contentAlignment = Alignment.Center) {
|
||||||
Modifier
|
|
||||||
.size(38.dp)
|
|
||||||
.clip(RoundedCornerShape(8.dp))
|
|
||||||
.background(CastarrColors.surfaceFocused),
|
|
||||||
contentAlignment = Alignment.Center,
|
|
||||||
) {
|
|
||||||
if (channel.logo.isNotEmpty()) {
|
if (channel.logo.isNotEmpty()) {
|
||||||
SubcomposeAsyncImage(
|
SubcomposeAsyncImage(
|
||||||
model = channel.logo,
|
model = channel.logo,
|
||||||
contentDescription = null,
|
contentDescription = null,
|
||||||
contentScale = ContentScale.Fit,
|
contentScale = ContentScale.Fit,
|
||||||
modifier = Modifier.fillMaxSize().padding(5.dp),
|
modifier = Modifier.fillMaxSize(),
|
||||||
loading = { LogoInitials(initials) },
|
loading = { LogoInitials(initials) },
|
||||||
error = { LogoInitials(initials) },
|
error = { LogoInitials(initials) },
|
||||||
)
|
)
|
||||||
|
|||||||
Reference in New Issue
Block a user