nav: use back chevron in more places
Signed-off-by: William Casarin <jb55@jb55.com>
This commit is contained in:
@@ -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 {
|
extension View {
|
||||||
func placeholder<Content: View>(
|
func placeholder<Content: View>(
|
||||||
when shouldShow: Bool,
|
when shouldShow: Bool,
|
||||||
|
|||||||
@@ -117,6 +117,8 @@ struct DMChatView: View {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
.toolbar { Header }
|
.toolbar { Header }
|
||||||
|
.navigationBarBackButtonHidden(true)
|
||||||
|
.navigationBarItems(leading: BackNavBasic())
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -147,6 +147,8 @@ struct ProfileView: View {
|
|||||||
followers.unsubscribe()
|
followers.unsubscribe()
|
||||||
// our profilemodel needs a bit more help
|
// our profilemodel needs a bit more help
|
||||||
}
|
}
|
||||||
|
.navigationBarBackButtonHidden(true)
|
||||||
|
.navigationBarItems(leading: BackNavBasic())
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -25,6 +25,8 @@ struct SearchView: View {
|
|||||||
.onDisappear() {
|
.onDisappear() {
|
||||||
search.unsubscribe()
|
search.unsubscribe()
|
||||||
}
|
}
|
||||||
|
.navigationBarBackButtonHidden(true)
|
||||||
|
.navigationBarItems(leading: BackNavBasic())
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user