diff --git a/damus/Views/CreateAccountView.swift b/damus/Views/CreateAccountView.swift index 3443e17..96d58ac 100644 --- a/damus/Views/CreateAccountView.swift +++ b/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( when shouldShow: Bool, diff --git a/damus/Views/DMChatView.swift b/damus/Views/DMChatView.swift index a55d03a..b8f62ca 100644 --- a/damus/Views/DMChatView.swift +++ b/damus/Views/DMChatView.swift @@ -117,6 +117,8 @@ struct DMChatView: View { } } .toolbar { Header } + .navigationBarBackButtonHidden(true) + .navigationBarItems(leading: BackNavBasic()) } } diff --git a/damus/Views/ProfileView.swift b/damus/Views/ProfileView.swift index afa6f87..8b12fe4 100644 --- a/damus/Views/ProfileView.swift +++ b/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()) } } diff --git a/damus/Views/SearchView.swift b/damus/Views/SearchView.swift index 53dc4cb..ba6366f 100644 --- a/damus/Views/SearchView.swift +++ b/damus/Views/SearchView.swift @@ -25,6 +25,8 @@ struct SearchView: View { .onDisappear() { search.unsubscribe() } + .navigationBarBackButtonHidden(true) + .navigationBarItems(leading: BackNavBasic()) } }