Add donation links to servers next to the privacy policy

This commit is contained in:
2026-10-16 17:02:29 +00:00
parent 5f2dbccebf
commit b13adc5340
12 changed files with 62 additions and 11 deletions
@@ -290,6 +290,7 @@ fun HomeScreen(modifier: Modifier = Modifier) {
subtitle = hostOf(p.url),
selected = selected == p.id,
onPolicy = p.policy?.let { url -> { openUrl(context, url) } },
onDonate = p.donate?.let { url -> { openUrl(context, url) } },
) { select(p.id) }
}
RowDivider()
@@ -571,6 +572,7 @@ private fun ProviderRow(
subtitle: String,
selected: Boolean,
onPolicy: (() -> Unit)? = null,
onDonate: (() -> Unit)? = null,
onClick: () -> Unit,
) {
val highlight by animateColorAsState(
@@ -598,6 +600,16 @@ private fun ProviderRow(
overflow = TextOverflow.Ellipsis,
)
}
if (onDonate != null) {
IconButton(onClick = onDonate, modifier = Modifier.size(40.dp)) {
Icon(
painterResource(R.drawable.ic_donate),
contentDescription = stringResource(R.string.donate),
tint = MaterialTheme.colorScheme.onSurfaceVariant,
modifier = Modifier.size(18.dp),
)
}
}
if (onPolicy != null) {
IconButton(onClick = onPolicy, modifier = Modifier.size(40.dp)) {
Icon(