Don't show NIP-05 validation error message when field is empty
Closes: #852
This commit is contained in:
committed by
William Casarin
parent
67041b22f4
commit
584a20ade1
@@ -202,8 +202,10 @@ struct EditMetadataView: View {
|
|||||||
}, footer: {
|
}, footer: {
|
||||||
if let parts = nip05_parts {
|
if let parts = nip05_parts {
|
||||||
Text("'\(parts.username)' at '\(parts.host)' will be used for verification", comment: "Description of how the nip05 identifier would be used for verification.")
|
Text("'\(parts.username)' at '\(parts.host)' will be used for verification", comment: "Description of how the nip05 identifier would be used for verification.")
|
||||||
} else {
|
} else if !nip05.isEmpty {
|
||||||
Text("'\(nip05)' is an invalid NIP-05 identifier. It should look like an email.", comment: "Description of why the nip05 identifier is invalid.")
|
Text("'\(nip05)' is an invalid NIP-05 identifier. It should look like an email.", comment: "Description of why the nip05 identifier is invalid.")
|
||||||
|
} else {
|
||||||
|
Text("") // without this, the keyboard dismisses unnecessarily when the footer changes state
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user