damus

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

commit 8d4c7a5ddc6704e5704f148055d0485f5642a34a
parent 5fdcecd44f35b4f6c7e96ac7dbb060356fa9ceb7
Author: Sam DuBois <sdubois@umass.edu>
Date:   Sat, 17 Dec 2022 22:00:00 -0700

Some layout changes to the profile view

Diffstat:
Mdamus/Views/EventView.swift | 4+++-
Mdamus/Views/ProfileView.swift | 9+++++----
2 files changed, 8 insertions(+), 5 deletions(-)

diff --git a/damus/Views/EventView.swift b/damus/Views/EventView.swift @@ -93,9 +93,11 @@ struct EventView: View { } .buttonStyle(PlainButtonStyle()) TextEvent(inner_ev, pubkey: inner_ev.pubkey) + .padding([.top], 2) } } else { TextEvent(event, pubkey: pubkey) + .padding([.top], 6) } } } @@ -146,7 +148,7 @@ struct EventView: View { .background(event_validity_color(event.validity)) .id(event.id) .frame(maxWidth: .infinity, minHeight: PFP_SIZE) - .padding([.bottom], 4) + .padding([.bottom], 2) .event_context_menu(event, privkey: damus.keypair.privkey) } } diff --git a/damus/Views/ProfileView.swift b/damus/Views/ProfileView.swift @@ -55,7 +55,7 @@ struct ProfileNameView: View { if let real_name = profile?.display_name { VStack(alignment: .leading) { Text(real_name) - .font(.title) + .font(.title3.weight(.bold)) ProfileName(pubkey: pubkey, profile: profile, prefix: "@", contacts: contacts, show_friend_confirmed: true) .font(.callout) .foregroundColor(.gray) @@ -103,8 +103,6 @@ struct ProfileView: View { HStack(alignment: .center) { ProfilePicView(pubkey: profile.pubkey, size: PFP_SIZE, highlight: .custom(Color.black, 2), profiles: damus_state.profiles) - - ProfileNameView(pubkey: profile.pubkey, profile: data, contacts: damus_state.contacts) Spacer() @@ -119,6 +117,9 @@ struct ProfileView: View { FollowButtonView(target: profile.get_follow_target(), follow_state: damus_state.contacts.follow_state(profile.pubkey)) } + ProfileNameView(pubkey: profile.pubkey, profile: data, contacts: damus_state.contacts) + .padding(.bottom) + KeyView(pubkey: profile.pubkey) .padding(.bottom, 10) .pubkey_context_menu(bech32_pubkey: bech32_pubkey(profile.pubkey) ?? profile.pubkey) @@ -158,6 +159,7 @@ struct ProfileView: View { VStack(alignment: .leading) { ScrollView { TopSection + .padding(.horizontal) Divider() @@ -165,7 +167,6 @@ struct ProfileView: View { } .frame(maxHeight: .infinity, alignment: .topLeading) } - .padding([.leading, .trailing], 6) .frame(maxWidth: .infinity, alignment: .topLeading) .navigationBarTitle("Profile") .onReceive(handle_notify(.switched_timeline)) { _ in