ExtensionScreen: Adjust item visual (#8120)
* ExtensionScreen: Adjust item visual * Move install status view and add progress indicator * Add secondary item modifier to info texts * Wrap info texts with FlowRow in case of unavailable space * Remove language text in non-installed items Extra content: * Change the list key to be more consistent * General cleanups * typo
This commit is contained in:
@@ -81,12 +81,11 @@ fun ExtensionIcon(
|
||||
is Extension.Available -> {
|
||||
AsyncImage(
|
||||
model = extension.iconUrl,
|
||||
contentDescription = "",
|
||||
contentDescription = null,
|
||||
placeholder = ColorPainter(Color(0x1F888888)),
|
||||
error = rememberResourceBitmapPainter(id = R.drawable.cover_error),
|
||||
modifier = modifier
|
||||
.clip(RoundedCornerShape(4.dp))
|
||||
.then(defaultModifier),
|
||||
.clip(RoundedCornerShape(4.dp)),
|
||||
)
|
||||
}
|
||||
is Extension.Installed -> {
|
||||
@@ -94,20 +93,20 @@ fun ExtensionIcon(
|
||||
when (icon) {
|
||||
Result.Error -> Image(
|
||||
bitmap = ImageBitmap.imageResource(id = R.mipmap.ic_local_source),
|
||||
contentDescription = "",
|
||||
modifier = modifier.then(defaultModifier),
|
||||
contentDescription = null,
|
||||
modifier = modifier,
|
||||
)
|
||||
Result.Loading -> Box(modifier = modifier.then(defaultModifier))
|
||||
Result.Loading -> Box(modifier = modifier)
|
||||
is Result.Success -> Image(
|
||||
bitmap = (icon as Result.Success<ImageBitmap>).value,
|
||||
contentDescription = "",
|
||||
modifier = modifier.then(defaultModifier),
|
||||
contentDescription = null,
|
||||
modifier = modifier,
|
||||
)
|
||||
}
|
||||
}
|
||||
is Extension.Untrusted -> Image(
|
||||
imageVector = Icons.Default.Dangerous,
|
||||
contentDescription = "",
|
||||
contentDescription = null,
|
||||
colorFilter = ColorFilter.tint(MaterialTheme.colorScheme.error),
|
||||
modifier = modifier.then(defaultModifier),
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user