Centralise the NIP-05 wildcard check (name != "_") on the data class itself.
This commit is contained in:
+2
-2
@@ -378,7 +378,7 @@ fun ObserveAndDisplayNIP05(
|
||||
) {
|
||||
val uri = LocalUriHandler.current
|
||||
|
||||
if (nip05State.nip05.name != "_") {
|
||||
if (nip05State.nip05.hasLocalPart()) {
|
||||
Text(
|
||||
text = remember(nip05State) { AnnotatedString(nip05State.nip05.name) },
|
||||
fontSize = Font14SP,
|
||||
@@ -407,7 +407,7 @@ fun DisplayNIP05(
|
||||
) {
|
||||
val uri = LocalUriHandler.current
|
||||
|
||||
if (nip05State.nip05.name != "_") {
|
||||
if (nip05State.nip05.hasLocalPart()) {
|
||||
Text(
|
||||
text = remember(nip05State) { AnnotatedString(nip05State.nip05.name) },
|
||||
fontSize = Font14SP,
|
||||
|
||||
+1
-1
@@ -188,7 +188,7 @@ private fun NonClickableObserveAndDisplayNIP05(
|
||||
nip05State: Nip05State.Exists,
|
||||
accountViewModel: AccountViewModel,
|
||||
) {
|
||||
if (nip05State.nip05.name != "_") {
|
||||
if (nip05State.nip05.hasLocalPart()) {
|
||||
Text(
|
||||
text = remember(nip05State) { AnnotatedString(nip05State.nip05.name) },
|
||||
fontSize = Font14SP,
|
||||
|
||||
+1
-1
@@ -490,7 +490,7 @@ private fun PubkeyNip05Row(
|
||||
|
||||
when (val nip05State = nip05StateMetadata) {
|
||||
is Nip05State.Exists -> {
|
||||
if (nip05State.nip05.name != "_") {
|
||||
if (nip05State.nip05.hasLocalPart()) {
|
||||
Text(
|
||||
text = remember(nip05State) { AnnotatedString(nip05State.nip05.name) },
|
||||
fontSize = Font14SP,
|
||||
|
||||
Reference in New Issue
Block a user