|
@@ -303,20 +303,22 @@ fun FavoriteServerItem(
|
|
val icon = if (server.enable == 1) Utils.getDrawable(context, server.iso)
|
|
val icon = if (server.enable == 1) Utils.getDrawable(context, server.iso)
|
|
else Utils.getDrawableGray(context, server.iso)
|
|
else Utils.getDrawableGray(context, server.iso)
|
|
|
|
|
|
- Icon(
|
|
|
|
- painter = painterResource(id = icon),
|
|
|
|
- contentDescription = "Server Logo",
|
|
|
|
- tint = Color.Unspecified,
|
|
|
|
- modifier = Modifier
|
|
|
|
- .padding(bottom = 16.dp)
|
|
|
|
- .size(24.dp)
|
|
|
|
- .clip(CircleShape)
|
|
|
|
- .border(1.dp, colorResource(id = R.color.gray_opac_04), CircleShape)
|
|
|
|
- .paint(
|
|
|
|
- painter = painterResource(id = icon),
|
|
|
|
- contentScale = ContentScale.FillBounds
|
|
|
|
- )
|
|
|
|
- )
|
|
|
|
|
|
+ if (icon != 0) {
|
|
|
|
+ Icon(
|
|
|
|
+ painter = painterResource(id = icon),
|
|
|
|
+ contentDescription = "Server Logo",
|
|
|
|
+ tint = Color.Unspecified,
|
|
|
|
+ modifier = Modifier
|
|
|
|
+ .padding(bottom = 16.dp)
|
|
|
|
+ .size(24.dp)
|
|
|
|
+ .clip(CircleShape)
|
|
|
|
+ .border(1.dp, colorResource(id = R.color.gray_opac_04), CircleShape)
|
|
|
|
+ .paint(
|
|
|
|
+ painter = painterResource(id = icon),
|
|
|
|
+ contentScale = ContentScale.FillBounds
|
|
|
|
+ )
|
|
|
|
+ )
|
|
|
|
+ }
|
|
|
|
|
|
Text(text = server.server_name!!,
|
|
Text(text = server.server_name!!,
|
|
color = MaterialTheme.colorScheme.primary,
|
|
color = MaterialTheme.colorScheme.primary,
|