mirror of
https://github.com/vitorpamplona/amethyst.git
synced 2025-10-04 23:03:40 +02:00
Renders invalid tags as is. Should stop crashing in notifications.
This commit is contained in:
@@ -183,10 +183,11 @@ fun TagLink(word: String, tags: List<List<String>>, accountViewModel: AccountVie
|
|||||||
if (user != null) {
|
if (user != null) {
|
||||||
ClickableUserTag(user, navController)
|
ClickableUserTag(user, navController)
|
||||||
} else {
|
} else {
|
||||||
Text(text = "${tags[index][1].toByteArray().toNpub().toShortenHex()} ")
|
Text(text = "$word ")
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
Text(text = "${tags[index][1].toByteArray().toNpub().toShortenHex()} ")
|
// if here the tag is not a valid Nostr Hex
|
||||||
|
Text(text = "$word ")
|
||||||
}
|
}
|
||||||
} else if (tags[index][0] == "e") {
|
} else if (tags[index][0] == "e") {
|
||||||
val note = LocalCache.checkGetOrCreateNote(tags[index][1])
|
val note = LocalCache.checkGetOrCreateNote(tags[index][1])
|
||||||
@@ -208,11 +209,10 @@ fun TagLink(word: String, tags: List<List<String>>, accountViewModel: AccountVie
|
|||||||
isQuotedNote = true,
|
isQuotedNote = true,
|
||||||
navController = navController)
|
navController = navController)
|
||||||
} else {
|
} else {
|
||||||
Text(text = "${tags[index][1].toByteArray().toNote().toShortenHex()} ")
|
// if here the tag is not a valid Nostr Hex
|
||||||
|
Text(text = "$word ")
|
||||||
}
|
}
|
||||||
} else
|
} else
|
||||||
Text(text = "$word ")
|
Text(text = "$word ")
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user