mirror of
https://github.com/vitorpamplona/amethyst.git
synced 2025-09-28 22:43:16 +02:00
Fixing spaces after urls
This commit is contained in:
@@ -12,7 +12,7 @@ fun ClickableUrl(urlText: String, url: String) {
|
|||||||
val uri = LocalUriHandler.current
|
val uri = LocalUriHandler.current
|
||||||
|
|
||||||
ClickableText(
|
ClickableText(
|
||||||
text = AnnotatedString("$urlText "),
|
text = AnnotatedString(urlText),
|
||||||
onClick = { runCatching { uri.openUri(url) } },
|
onClick = { runCatching { uri.openUri(url) } },
|
||||||
style = LocalTextStyle.current.copy(color = MaterialTheme.colors.primary)
|
style = LocalTextStyle.current.copy(color = MaterialTheme.colors.primary)
|
||||||
)
|
)
|
||||||
|
@@ -155,7 +155,7 @@ fun RichTextViewer(
|
|||||||
val additionalChars = matcher.group(4) ?: "" // additional chars
|
val additionalChars = matcher.group(4) ?: "" // additional chars
|
||||||
|
|
||||||
ClickableUrl(url, "https://$url")
|
ClickableUrl(url, "https://$url")
|
||||||
Text("$additionalChars")
|
Text("$additionalChars ")
|
||||||
} else if (tagIndex.matcher(word).matches() && tags != null) {
|
} else if (tagIndex.matcher(word).matches() && tags != null) {
|
||||||
TagLink(word, tags, canPreview, backgroundColor, accountViewModel, navController)
|
TagLink(word, tags, canPreview, backgroundColor, accountViewModel, navController)
|
||||||
} else if (hashTagsPattern.matcher(word).matches()) {
|
} else if (hashTagsPattern.matcher(word).matches()) {
|
||||||
@@ -182,7 +182,7 @@ fun RichTextViewer(
|
|||||||
val additionalChars = matcher.group(4) ?: "" // additional chars
|
val additionalChars = matcher.group(4) ?: "" // additional chars
|
||||||
|
|
||||||
ClickableUrl(url, "https://$url")
|
ClickableUrl(url, "https://$url")
|
||||||
Text("$additionalChars")
|
Text("$additionalChars ")
|
||||||
} else if (tagIndex.matcher(word).matches() && tags != null) {
|
} else if (tagIndex.matcher(word).matches() && tags != null) {
|
||||||
TagLink(word, tags, canPreview, backgroundColor, accountViewModel, navController)
|
TagLink(word, tags, canPreview, backgroundColor, accountViewModel, navController)
|
||||||
} else if (hashTagsPattern.matcher(word).matches()) {
|
} else if (hashTagsPattern.matcher(word).matches()) {
|
||||||
|
Reference in New Issue
Block a user