Show npub abbreviations instead of hex

Changelog-Changed: Show npub abbreviations instead of old-style hex
This commit is contained in:
William Casarin
2022-12-27 14:14:49 -08:00
parent aea271182e
commit 538ce45c2c
6 changed files with 15 additions and 7 deletions

View File

@@ -14,7 +14,8 @@ struct MentionView: View {
var body: some View {
switch mention.type {
case .pubkey:
PubkeyView(pubkey: mention.ref.ref_id, relay: mention.ref.relay_id)
let pk = bech32_pubkey(mention.ref.ref_id) ?? mention.ref.ref_id
PubkeyView(pubkey: pk, relay: mention.ref.relay_id)
case .event:
Text("< e >")
//EventBlockView(pubkey: mention.ref.ref_id, relay: mention.ref.relay_id)