Fixes https://github.com/vitorpamplona/amethyst/issues/103 Doesn't do anything if the content in the field is not a URI.

This commit is contained in:
Vitor Pamplona 2023-02-09 15:11:20 -05:00
parent 4097263c12
commit 5069c30a4a

View File

@ -339,7 +339,7 @@ private fun DrawAdditionalInfo(baseUser: User) {
ClickableText(
text = AnnotatedString(website.removePrefix("https://")),
onClick = { user.info.website?.let { uri.openUri(it) } },
onClick = { user.info.website?.let { runCatching { uri.openUri(it) } } },
style = LocalTextStyle.current.copy(color = MaterialTheme.colors.primary),
modifier = Modifier.padding(top = 1.dp, bottom = 1.dp, start = 5.dp)
)