Only showing the paid relay icon when the relay is paid.

This commit is contained in:
Vitor Pamplona
2023-06-23 18:09:03 -04:00
parent aa931a4cc5
commit f8acb26763
@@ -282,22 +282,19 @@ fun ServerConfig(
Column(Modifier.weight(1f)) { Column(Modifier.weight(1f)) {
Row(verticalAlignment = Alignment.CenterVertically) { Row(verticalAlignment = Alignment.CenterVertically) {
if (item.paidRelay) {
Icon( Icon(
imageVector = Icons.Default.Paid, imageVector = Icons.Default.Paid,
null, null,
modifier = Modifier modifier = Modifier
.padding(end = 5.dp) .padding(end = 5.dp)
.size(15.dp), .size(14.dp),
tint = if (item.paidRelay) { tint = Color.Green
Color.Green
} else {
MaterialTheme.colors.onSurface.copy(
alpha = 0.32f
) )
} }
)
Text( Text(
text = item.url.removePrefix("wss://"), text = item.url.removePrefix("wss://").removeSuffix("/"),
modifier = Modifier modifier = Modifier
.weight(1f) .weight(1f)
.clickable { .clickable {