mirror of
https://github.com/vitorpamplona/amethyst.git
synced 2025-09-25 19:46:58 +02:00
Fixes Clickable tag for addresses (naddr)
This commit is contained in:
@@ -184,17 +184,9 @@ private fun isArabic(text: String): Boolean {
|
|||||||
}
|
}
|
||||||
|
|
||||||
fun isBechLink(word: String): Boolean {
|
fun isBechLink(word: String): Boolean {
|
||||||
return word.startsWith("nostr:", true) ||
|
val cleaned = word.removePrefix("@").removePrefix("nostr:").removePrefix("@")
|
||||||
word.startsWith("npub1", true) ||
|
|
||||||
word.startsWith("naddr1", true) ||
|
return listOf("npub1", "naddr1", "note1", "nprofile1", "nevent1").any { cleaned.startsWith(it, true) }
|
||||||
word.startsWith("note1", true) ||
|
|
||||||
word.startsWith("nprofile1", true) ||
|
|
||||||
word.startsWith("nevent1", true) ||
|
|
||||||
word.startsWith("@npub1", true) ||
|
|
||||||
word.startsWith("@note1", true) ||
|
|
||||||
word.startsWith("@addr1", true) ||
|
|
||||||
word.startsWith("@nprofile1", true) ||
|
|
||||||
word.startsWith("@nevent1", true)
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Composable
|
@Composable
|
||||||
|
Reference in New Issue
Block a user