From 5fdcecd44f35b4f6c7e96ac7dbb060356fa9ceb7 Mon Sep 17 00:00:00 2001 From: William Casarin Date: Sun, 18 Dec 2022 09:23:16 -0800 Subject: [PATCH 1/9] Fix crash in null bolt11 descriptions Changelog-Fixed: Fixed crashed on lightning invoices with empty descriptions --- damus/Models/Mentions.swift | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/damus/Models/Mentions.swift b/damus/Models/Mentions.swift index 6a3de585..ecdeb067 100644 --- a/damus/Models/Mentions.swift +++ b/damus/Models/Mentions.swift @@ -189,7 +189,11 @@ func convert_invoice_block(_ b: invoice_block) -> Block? { return nil } - let description = String(cString: b11.description) + var description = "" + if b11.description != nil { + description = String(cString: b11.description) + } + guard let msat = maybe_pointee(b11.msat) else { return nil } From 8d4c7a5ddc6704e5704f148055d0485f5642a34a Mon Sep 17 00:00:00 2001 From: Sam DuBois Date: Sat, 17 Dec 2022 22:00:00 -0700 Subject: [PATCH 2/9] Some layout changes to the profile view --- damus/Views/EventView.swift | 4 +++- damus/Views/ProfileView.swift | 9 +++++---- 2 files changed, 8 insertions(+), 5 deletions(-) diff --git a/damus/Views/EventView.swift b/damus/Views/EventView.swift index e16eaf14..23392eb8 100644 --- 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 index 5194dd37..09be945d 100644 --- 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 From 70539ade4505974d67ff9c4430a95bbafd81ffe3 Mon Sep 17 00:00:00 2001 From: Sam DuBois Date: Sat, 17 Dec 2022 23:28:35 -0700 Subject: [PATCH 3/9] Some more improvements to the two views Looking better for sure Changelog-Changed: Improved look of profile view --- damus/Views/FollowButtonView.swift | 15 ++++++++++-- damus/Views/ProfileView.swift | 39 ++++++++++++++++-------------- 2 files changed, 34 insertions(+), 20 deletions(-) diff --git a/damus/Views/FollowButtonView.swift b/damus/Views/FollowButtonView.swift index bd765415..ea8280e5 100644 --- a/damus/Views/FollowButtonView.swift +++ b/damus/Views/FollowButtonView.swift @@ -12,10 +12,21 @@ struct FollowButtonView: View { @State var follow_state: FollowState var body: some View { - Button("\(follow_btn_txt(follow_state))") { + Button { follow_state = perform_follow_btn_action(follow_state, target: target) + } label: { + Text(follow_btn_txt(follow_state)) + .padding(.horizontal, 20) + .padding(.vertical, 7) + .font(.caption.weight(.bold)) + .foregroundColor(follow_state == .unfollows ? .white : .black) + .background(follow_state == .unfollows ? .black : .white) + .cornerRadius(20) + .overlay { + RoundedRectangle(cornerRadius: 16) + .stroke(follow_state == .unfollows ? .white : .gray, lineWidth: 1) + } } - .buttonStyle(.bordered) .onReceive(handle_notify(.followed)) { notif in let pk = notif.object as! String if pk != target.pubkey { diff --git a/damus/Views/ProfileView.swift b/damus/Views/ProfileView.swift index 09be945d..7e06393a 100644 --- a/damus/Views/ProfileView.swift +++ b/damus/Views/ProfileView.swift @@ -82,8 +82,10 @@ struct ProfileView: View { Button(action: { UIApplication.shared.open(url) }) { - Label("", systemImage: "bolt.fill") - .foregroundColor(.orange) + Image(systemName: "bolt.circle") + .symbolRenderingMode(.palette) + .foregroundStyle(.black, .gray) + .font(.system(size: 27).weight(.thin)) } } @@ -92,9 +94,11 @@ struct ProfileView: View { let dmview = DMChatView(damus_state: damus_state, pubkey: profile.pubkey) .environmentObject(dm_model) return NavigationLink(destination: dmview) { - Label("", systemImage: "text.bubble") + Image(systemName: "bubble.left.circle") + .symbolRenderingMode(.palette) + .font(.system(size: 29).weight(.thin)) + .foregroundStyle(.black, .gray) } - .buttonStyle(PlainButtonStyle()) } var TopSection: some View { @@ -106,13 +110,14 @@ 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) - .padding([.trailing], 20) } DMButton - .padding([.trailing], 20) FollowButtonView(target: profile.get_follow_target(), follow_state: damus_state.contacts.follow_state(profile.pubkey)) } @@ -120,10 +125,6 @@ struct ProfileView: View { 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) - Text(data?.about ?? "") Divider() @@ -209,18 +210,20 @@ struct KeyView: View { @Environment(\.colorScheme) var colorScheme + @State private var isCopied = false + var body: some View { let col = id_to_color(pubkey) let bech32 = bech32_pubkey(pubkey) ?? pubkey - let half = bech32.count / 2 - VStack { - Text("\(String(bech32.prefix(half)))") - .foregroundColor(colorScheme == .light ? .black : col) - .font(.footnote.monospaced()) - Text("\(String(bech32.suffix(half)))") - .font(.footnote.monospaced()) - .foregroundColor(colorScheme == .light ? .black : col) + Button { + UIPasteboard.general.string = bech32 + isCopied = true + } label: { + Label(isCopied ? "Copied" : "", systemImage: "key.fill") + .font(isCopied ? .caption : .system(size: 15).weight(.light)) + .symbolRenderingMode(.hierarchical) + .foregroundColor(isCopied ? .gray : col) } } } From ea8394e7cf7ee550529bdfff9ec43e221a79f524 Mon Sep 17 00:00:00 2001 From: Sam DuBois Date: Sat, 17 Dec 2022 23:54:57 -0700 Subject: [PATCH 4/9] 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 --- damus/Views/ProfileView.swift | 20 +++++++++++++------- 1 file changed, 13 insertions(+), 7 deletions(-) diff --git a/damus/Views/ProfileView.swift b/damus/Views/ProfileView.swift index 7e06393a..ca6ebd1b 100644 --- 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() } From d7d8076bee0bc38ab210c8dfe92d0091b6b8e281 Mon Sep 17 00:00:00 2001 From: Sam DuBois Date: Sat, 17 Dec 2022 15:26:03 -0700 Subject: [PATCH 5/9] Adding a small empty timeline view to make it more obvious when there is no content and when there is content --- damus.xcodeproj/project.pbxproj | 12 ++++++++ damus/Views/DirectMessagesView.swift | 8 +++-- .../Views/Empty Views/EmptyTimelineView.swift | 29 +++++++++++++++++++ damus/Views/TimelineView.swift | 25 +++++++++------- 4 files changed, 62 insertions(+), 12 deletions(-) create mode 100644 damus/Views/Empty Views/EmptyTimelineView.swift diff --git a/damus.xcodeproj/project.pbxproj b/damus.xcodeproj/project.pbxproj index 5b8e3207..b941a3b0 100644 --- a/damus.xcodeproj/project.pbxproj +++ b/damus.xcodeproj/project.pbxproj @@ -7,6 +7,7 @@ objects = { /* Begin PBXBuildFile section */ + 3169CAE6294E69C000EE4006 /* EmptyTimelineView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3169CAE5294E69C000EE4006 /* EmptyTimelineView.swift */; }; 4C06670128FC7C5900038D2A /* RelayView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4C06670028FC7C5900038D2A /* RelayView.swift */; }; 4C06670428FC7EC500038D2A /* Kingfisher in Frameworks */ = {isa = PBXBuildFile; productRef = 4C06670328FC7EC500038D2A /* Kingfisher */; }; 4C06670628FCB08600038D2A /* ImageCarousel.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4C06670528FCB08600038D2A /* ImageCarousel.swift */; }; @@ -146,6 +147,7 @@ /* End PBXContainerItemProxy section */ /* Begin PBXFileReference section */ + 3169CAE5294E69C000EE4006 /* EmptyTimelineView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = EmptyTimelineView.swift; sourceTree = ""; }; 4C06670028FC7C5900038D2A /* RelayView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = RelayView.swift; sourceTree = ""; }; 4C06670528FCB08600038D2A /* ImageCarousel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ImageCarousel.swift; sourceTree = ""; }; 4C06670828FDE64700038D2A /* damus-Bridging-Header.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "damus-Bridging-Header.h"; sourceTree = ""; }; @@ -330,6 +332,14 @@ /* End PBXFrameworksBuildPhase section */ /* Begin PBXGroup section */ + 3169CAE4294E699400EE4006 /* Empty Views */ = { + isa = PBXGroup; + children = ( + 3169CAE5294E69C000EE4006 /* EmptyTimelineView.swift */, + ); + path = "Empty Views"; + sourceTree = ""; + }; 4C06670728FDE62900038D2A /* damus-c */ = { isa = PBXGroup; children = ( @@ -421,6 +431,7 @@ 4C75EFA227FA576C0006080F /* Views */ = { isa = PBXGroup; children = ( + 3169CAE4294E699400EE4006 /* Empty Views */, 4C75EFA327FA577B0006080F /* PostView.swift */, 4C75EFAC28049CFB0006080F /* PostButton.swift */, 4C75EFB82804A2740006080F /* EventView.swift */, @@ -778,6 +789,7 @@ 4C3AC79F2833115300E1F516 /* FollowButtonView.swift in Sources */, 4C3BEFD22819DB9B00B3DE84 /* ProfileModel.swift in Sources */, 4C0A3F93280F66F5000448DE /* ReplyMap.swift in Sources */, + 3169CAE6294E69C000EE4006 /* EmptyTimelineView.swift in Sources */, 4C3EA64928FF597700C48A62 /* bech32.c in Sources */, 4C90BD162839DB54008EE7EF /* NostrMetadata.swift in Sources */, 4C3EA67528FF7A5A00C48A62 /* take.c in Sources */, diff --git a/damus/Views/DirectMessagesView.swift b/damus/Views/DirectMessagesView.swift index 91e52504..97e18ee6 100644 --- a/damus/Views/DirectMessagesView.swift +++ b/damus/Views/DirectMessagesView.swift @@ -14,8 +14,12 @@ struct DirectMessagesView: View { var MainContent: some View { ScrollView { LazyVStack { - ForEach(model.dms, id: \.0) { tup in - MaybeEvent(tup) + if model.dms.isEmpty, !model.loading { + EmptyTimelineView() + } else { + ForEach(model.dms, id: \.0) { tup in + MaybeEvent(tup) + } } } .padding(.horizontal) diff --git a/damus/Views/Empty Views/EmptyTimelineView.swift b/damus/Views/Empty Views/EmptyTimelineView.swift new file mode 100644 index 00000000..f4bcda3c --- /dev/null +++ b/damus/Views/Empty Views/EmptyTimelineView.swift @@ -0,0 +1,29 @@ +// +// EmptyNotificationsView.swift +// damus +// +// Created by Sam DuBois on 12/17/22. +// + +import SwiftUI + +struct EmptyTimelineView: View { + var body: some View { + VStack { + Image(systemName: "tray.fill") + .font(.system(size: 35)) + .padding() + Text("Nothing to see here. Check back later!") + .multilineTextAlignment(.center) + .font(.callout.weight(.medium)) + } + .foregroundColor(.gray) + .padding() + } +} + +struct EmptyTimelineView_Previews: PreviewProvider { + static var previews: some View { + EmptyTimelineView() + } +} diff --git a/damus/Views/TimelineView.swift b/damus/Views/TimelineView.swift index d36e33c4..b4f0b90a 100644 --- a/damus/Views/TimelineView.swift +++ b/damus/Views/TimelineView.swift @@ -20,16 +20,20 @@ struct InnerTimelineView: View { var body: some View { LazyVStack { - ForEach(events.filter(filter), id: \.id) { (ev: NostrEvent) in - let tm = ThreadModel(event: inner_event_or_self(ev: ev), damus_state: damus) - let is_chatroom = should_show_chatroom(ev) - let tv = ThreadView(thread: tm, damus: damus, is_chatroom: is_chatroom) - - NavigationLink(destination: tv) { - EventView(event: ev, highlight: .none, has_action_bar: true, damus: damus, show_friend_icon: show_friend_icon) + if events.isEmpty { + EmptyTimelineView() + } else { + ForEach(events.filter(filter), id: \.id) { (ev: NostrEvent) in + let tm = ThreadModel(event: inner_event_or_self(ev: ev), damus_state: damus) + let is_chatroom = should_show_chatroom(ev) + let tv = ThreadView(thread: tm, damus: damus, is_chatroom: is_chatroom) + + NavigationLink(destination: tv) { + EventView(event: ev, highlight: .none, has_action_bar: true, damus: damus, show_friend_icon: show_friend_icon) + } + .isDetailLink(true) + .buttonStyle(PlainButtonStyle()) } - .isDetailLink(true) - .buttonStyle(PlainButtonStyle()) } } .padding(.horizontal) @@ -54,8 +58,9 @@ struct TimelineView: View { if loading { ProgressView() .progressViewStyle(.circular) + } else { + InnerTimelineView(events: $events, damus: damus, show_friend_icon: show_friend_icon, filter: filter) } - InnerTimelineView(events: $events, damus: damus, show_friend_icon: show_friend_icon, filter: filter) } .onReceive(NotificationCenter.default.publisher(for: .scroll_to_top)) { _ in guard let event = events.filter(self.filter).first else { From caa03e336f0f1db21b1ffbd994865b9c688397df Mon Sep 17 00:00:00 2001 From: William Casarin Date: Sun, 18 Dec 2022 16:11:16 -0800 Subject: [PATCH 6/9] add wiz's relay to the bootstrap relays --- damus/ContentView.swift | 1 + 1 file changed, 1 insertion(+) diff --git a/damus/ContentView.swift b/damus/ContentView.swift index ac8a863e..ff2b8228 100644 --- a/damus/ContentView.swift +++ b/damus/ContentView.swift @@ -12,6 +12,7 @@ import Kingfisher var BOOTSTRAP_RELAYS = [ "wss://relay.damus.io", "wss://nostr-relay.wlvs.space", + "wss://nostr.fmt.wiz.biz", "wss://nostr.oxtr.dev", ] From 015e0651a4b6937cc8da9f403e7b9a8084f58707 Mon Sep 17 00:00:00 2001 From: William Casarin Date: Sun, 18 Dec 2022 16:23:53 -0800 Subject: [PATCH 7/9] img: only show images if it is a post from your friend Changelog-Changed: Only show inline images from your friends --- damus/Views/ChatView.swift | 2 +- damus/Views/DMView.swift | 2 +- damus/Views/EventView.swift | 10 +++++++++- 3 files changed, 11 insertions(+), 3 deletions(-) diff --git a/damus/Views/ChatView.swift b/damus/Views/ChatView.swift index 53e6d90d..09021248 100644 --- a/damus/Views/ChatView.swift +++ b/damus/Views/ChatView.swift @@ -106,7 +106,7 @@ struct ChatView: View { } } - NoteContentView(privkey: damus_state.keypair.privkey, event: event, profiles: damus_state.profiles, show_images: true, artifacts: .just_content(event.content)) + NoteContentView(privkey: damus_state.keypair.privkey, event: event, profiles: damus_state.profiles, show_images: should_show_images(contacts: damus_state.contacts, ev: event), artifacts: .just_content(event.content)) if is_active || next_ev == nil || next_ev!.pubkey != event.pubkey { let bar = make_actionbar_model(ev: event, damus: damus_state) diff --git a/damus/Views/DMView.swift b/damus/Views/DMView.swift index 18ac2ed3..741eb504 100644 --- a/damus/Views/DMView.swift +++ b/damus/Views/DMView.swift @@ -21,7 +21,7 @@ struct DMView: View { Spacer() } - NoteContentView(privkey: damus_state.keypair.privkey, event: event, profiles: damus_state.profiles, show_images: true, artifacts: .just_content(event.get_content(damus_state.keypair.privkey))) + NoteContentView(privkey: damus_state.keypair.privkey, event: event, profiles: damus_state.profiles, show_images: should_show_images(contacts: damus_state.contacts, ev: event), artifacts: .just_content(event.get_content(damus_state.keypair.privkey))) .foregroundColor(is_ours ? Color.white : Color.primary) .padding(10) .background(is_ours ? Color.accentColor : Color.secondary.opacity(0.15)) diff --git a/damus/Views/EventView.swift b/damus/Views/EventView.swift index 23392eb8..75979f16 100644 --- a/damus/Views/EventView.swift +++ b/damus/Views/EventView.swift @@ -131,7 +131,7 @@ struct EventView: View { .frame(maxWidth: .infinity, alignment: .leading) } - NoteContentView(privkey: damus.keypair.privkey, event: event, profiles: damus.profiles, show_images: true, artifacts: .just_content(content)) + NoteContentView(privkey: damus.keypair.privkey, event: event, profiles: damus.profiles, show_images: should_show_images(contacts: damus.contacts, ev: event), artifacts: .just_content(content)) .frame(maxWidth: .infinity, alignment: .leading) if has_action_bar { @@ -153,6 +153,14 @@ struct EventView: View { } } +// blame the porn bots for this code +func should_show_images(contacts: Contacts, ev: NostrEvent) -> Bool { + if contacts.is_friend(ev.pubkey) { + return true + } + return false +} + func event_validity_color(_ validation: ValidationResult) -> some View { Group { switch validation { From 573bf37fbb9d3e650679115e5879b76ae79c3237 Mon Sep 17 00:00:00 2001 From: William Casarin Date: Sun, 18 Dec 2022 17:36:33 -0800 Subject: [PATCH 8/9] use bootstrap relays in account creation --- damus/Nostr/NostrEvent.swift | 5 ++++- damus/Views/SaveKeysView.swift | 5 ++++- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/damus/Nostr/NostrEvent.swift b/damus/Nostr/NostrEvent.swift index 3aa8008e..fe7ce893 100644 --- a/damus/Nostr/NostrEvent.swift +++ b/damus/Nostr/NostrEvent.swift @@ -485,7 +485,10 @@ func make_first_contact_event(keypair: Keypair) -> NostrEvent? { } let rw_relay_info = RelayInfo(read: true, write: true) - let relays: [String: RelayInfo] = ["wss://relay.damus.io": rw_relay_info] + var relays: [String: RelayInfo] = [:] + for relay in BOOTSTRAP_RELAYS { + relays[relay] = rw_relay_info + } let relay_json = encode_json(relays)! let damus_pubkey = "3efdaebb1d8923ebd99c9e7ace3b4194ab45512e2be79c1b7d68d9243e0d2681" let tags = [ diff --git a/damus/Views/SaveKeysView.swift b/damus/Views/SaveKeysView.swift index 61ad197d..70d26c09 100644 --- a/damus/Views/SaveKeysView.swift +++ b/damus/Views/SaveKeysView.swift @@ -80,7 +80,10 @@ struct SaveKeysView: View { } func complete_account_creation(_ account: CreateAccountModel) { - add_rw_relay(self.pool, "wss://relay.damus.io") + for relay in BOOTSTRAP_RELAYS { + add_rw_relay(self.pool, relay) + } + self.pool.register_handler(sub_id: "signup", handler: handle_event) self.loading = true From 78d258d04e04e784ddf9ab3ec417dd23d76243d0 Mon Sep 17 00:00:00 2001 From: William Casarin Date: Sun, 18 Dec 2022 17:36:50 -0800 Subject: [PATCH 9/9] Dismiss keyboard in account creation Changelog-Fixed: Added ability to dismiss keyboard during account creation --- damus/Views/CreateAccountView.swift | 1 + 1 file changed, 1 insertion(+) diff --git a/damus/Views/CreateAccountView.swift b/damus/Views/CreateAccountView.swift index 3443e170..9521e450 100644 --- a/damus/Views/CreateAccountView.swift +++ b/damus/Views/CreateAccountView.swift @@ -83,6 +83,7 @@ struct CreateAccountView: View { .padding(.trailing, 20.0) } + .dismissKeyboardOnTap() .navigationBarTitleDisplayMode(.inline) .navigationBarBackButtonHidden(true) .navigationBarItems(leading: BackNav())