damus

nostr ios client
git clone git://jb55.com/damus
Log | Files | Refs | README | LICENSE

commit ea8394e7cf7ee550529bdfff9ec43e221a79f524
parent 70539ade4505974d67ff9c4430a95bbafd81ffe3
Author: Sam DuBois <sdubois@umass.edu>
Date:   Sat, 17 Dec 2022 23:54:57 -0700

Moved the key over across from the name

Almost like a temporary verifier in a way. I think I would also like to
organize this file eventually so its a bit easier to find things

Diffstat:
Mdamus/Views/ProfileView.swift | 20+++++++++++++-------
1 file changed, 13 insertions(+), 7 deletions(-)

diff --git a/damus/Views/ProfileView.swift b/damus/Views/ProfileView.swift @@ -54,14 +54,24 @@ struct ProfileNameView: View { Group { if let real_name = profile?.display_name { VStack(alignment: .leading) { - Text(real_name) - .font(.title3.weight(.bold)) + HStack { + Text(real_name) + .font(.title3.weight(.bold)) + + KeyView(pubkey: pubkey) + .pubkey_context_menu(bech32_pubkey: pubkey) + } ProfileName(pubkey: pubkey, profile: profile, prefix: "@", contacts: contacts, show_friend_confirmed: true) .font(.callout) .foregroundColor(.gray) } } else { - ProfileName(pubkey: pubkey, profile: profile, contacts: contacts, show_friend_confirmed: true) + HStack { + ProfileName(pubkey: pubkey, profile: profile, contacts: contacts, show_friend_confirmed: true) + + KeyView(pubkey: pubkey) + .pubkey_context_menu(bech32_pubkey: pubkey) + } } } } @@ -110,9 +120,6 @@ struct ProfileView: View { Spacer() - KeyView(pubkey: profile.pubkey) - .pubkey_context_menu(bech32_pubkey: bech32_pubkey(profile.pubkey) ?? profile.pubkey) - if let lnuri = data?.lightning_uri { LNButton(lnuri) } @@ -169,7 +176,6 @@ struct ProfileView: View { .frame(maxHeight: .infinity, alignment: .topLeading) } .frame(maxWidth: .infinity, alignment: .topLeading) - .navigationBarTitle("Profile") .onReceive(handle_notify(.switched_timeline)) { _ in dismiss() }