mirror of
https://github.com/vitorpamplona/amethyst.git
synced 2025-10-06 22:43:24 +02:00
Forces URLs to be single line.
This commit is contained in:
@@ -27,6 +27,7 @@ import androidx.compose.runtime.Composable
|
|||||||
import androidx.compose.runtime.remember
|
import androidx.compose.runtime.remember
|
||||||
import androidx.compose.ui.platform.LocalUriHandler
|
import androidx.compose.ui.platform.LocalUriHandler
|
||||||
import androidx.compose.ui.text.AnnotatedString
|
import androidx.compose.ui.text.AnnotatedString
|
||||||
|
import androidx.compose.ui.text.style.TextOverflow
|
||||||
|
|
||||||
@Composable
|
@Composable
|
||||||
fun ClickableUrl(
|
fun ClickableUrl(
|
||||||
@@ -39,6 +40,8 @@ fun ClickableUrl(
|
|||||||
|
|
||||||
ClickableText(
|
ClickableText(
|
||||||
text = text,
|
text = text,
|
||||||
|
maxLines = 1,
|
||||||
|
overflow = TextOverflow.Ellipsis,
|
||||||
onClick = {
|
onClick = {
|
||||||
runCatching {
|
runCatching {
|
||||||
val doubleCheckedUrl = if (url.contains("://")) url else "https://$url"
|
val doubleCheckedUrl = if (url.contains("://")) url else "https://$url"
|
||||||
|
Reference in New Issue
Block a user