Browse Source

nav: use back chevron in more places

Signed-off-by: William Casarin <jb55@jb55.com>
profiles-everywhere
William Casarin 3 years ago
parent
commit
ea0e28d2c5
  1. 11
      damus/Views/CreateAccountView.swift
  2. 2
      damus/Views/DMChatView.swift
  3. 2
      damus/Views/ProfileView.swift
  4. 2
      damus/Views/SearchView.swift

11
damus/Views/CreateAccountView.swift

@ -101,6 +101,17 @@ struct BackNav: View {
}
}
struct BackNavBasic: View {
@Environment(\.dismiss) var dismiss
var body: some View {
Image(systemName: "chevron.backward")
.onTapGesture {
self.dismiss()
}
}
}
extension View {
func placeholder<Content: View>(
when shouldShow: Bool,

2
damus/Views/DMChatView.swift

@ -117,6 +117,8 @@ struct DMChatView: View {
}
}
.toolbar { Header }
.navigationBarBackButtonHidden(true)
.navigationBarItems(leading: BackNavBasic())
}
}

2
damus/Views/ProfileView.swift

@ -147,6 +147,8 @@ struct ProfileView: View {
followers.unsubscribe()
// our profilemodel needs a bit more help
}
.navigationBarBackButtonHidden(true)
.navigationBarItems(leading: BackNavBasic())
}
}

2
damus/Views/SearchView.swift

@ -25,6 +25,8 @@ struct SearchView: View {
.onDisappear() {
search.unsubscribe()
}
.navigationBarBackButtonHidden(true)
.navigationBarItems(leading: BackNavBasic())
}
}

Loading…
Cancel
Save