Browse Source

config: don't add relay even if we've cancelled

Changelog-Fixed: Cancel button on add relay view
Signed-off-by: William Casarin <jb55@jb55.com>
profiles-everywhere
William Casarin 3 years ago
parent
commit
4f5c9b1bf7
  1. 9
      damus/Views/ConfigView.swift

9
damus/Views/ConfigView.swift

@ -102,8 +102,13 @@ struct ConfigView: View {
Text("Make sure your nsec account key is saved before you logout or you will lose access to this account") Text("Make sure your nsec account key is saved before you logout or you will lose access to this account")
} }
.sheet(isPresented: $show_add_relay) { .sheet(isPresented: $show_add_relay) {
AddRelayView(show_add_relay: $show_add_relay, relay: $new_relay) { _ in AddRelayView(show_add_relay: $show_add_relay, relay: $new_relay) { m_relay in
guard let url = URL(string: new_relay) else {
guard let relay = m_relay else {
return
}
guard let url = URL(string: relay) else {
return return
} }

Loading…
Cancel
Save