From 7e89822cbf05e1d36bf7580ae1cb60f621cc4301 Mon Sep 17 00:00:00 2001 From: Vitor Pamplona Date: Sat, 25 Mar 2023 16:16:41 -0400 Subject: [PATCH] BugFix for nostr: in content. --- .../amethyst/ui/components/RichTextViewer.kt | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/app/src/main/java/com/vitorpamplona/amethyst/ui/components/RichTextViewer.kt b/app/src/main/java/com/vitorpamplona/amethyst/ui/components/RichTextViewer.kt index 08e906e78..f10a721ce 100644 --- a/app/src/main/java/com/vitorpamplona/amethyst/ui/components/RichTextViewer.kt +++ b/app/src/main/java/com/vitorpamplona/amethyst/ui/components/RichTextViewer.kt @@ -172,6 +172,8 @@ fun RichTextViewer( ClickableEmail(word) } else if (Patterns.PHONE.matcher(word).matches() && word.length > 6) { ClickablePhone(word) + } else if (isBechLink(word)) { + BechLink(word, navController) } else if (noProtocolUrlValidator.matcher(word).matches()) { val matcher = noProtocolUrlValidator.matcher(word) matcher.find() @@ -184,8 +186,6 @@ fun RichTextViewer( TagLink(word, tags, canPreview, backgroundColor, accountViewModel, navController) } else if (hashTagsPattern.matcher(word).matches()) { HashTag(word, accountViewModel, navController) - } else if (isBechLink(word)) { - BechLink(word, navController) } else { Text( text = "$word ", @@ -199,6 +199,8 @@ fun RichTextViewer( ClickableEmail(word) } else if (Patterns.PHONE.matcher(word).matches() && word.length > 6) { ClickablePhone(word) + } else if (isBechLink(word)) { + BechLink(word, navController) } else if (noProtocolUrlValidator.matcher(word).matches()) { val matcher = noProtocolUrlValidator.matcher(word) matcher.find() @@ -211,8 +213,6 @@ fun RichTextViewer( TagLink(word, tags, canPreview, backgroundColor, accountViewModel, navController) } else if (hashTagsPattern.matcher(word).matches()) { HashTag(word, accountViewModel, navController) - } else if (isBechLink(word)) { - BechLink(word, navController) } else { Text( text = "$word ",