NavView: Switch to NavigationStack for iOS 17 and up

iOS 17 fixes the issues that NavigationStack had with iOS 16. This
means that futureproofing is fixed.

Signed-off-by: kingbri <bdashore3@proton.me>
This commit is contained in:
kingbri 2023-08-27 01:14:26 -04:00
parent 13a40a237a
commit 2e746320cf

View file

@ -14,18 +14,16 @@ struct NavView<Content: View>: View {
@ViewBuilder var content: Content @ViewBuilder var content: Content
var body: some View { var body: some View {
// Uncomment once NavigationStack issues are fixed // NavigationStack issues are fixed on iOS 17
/* if #available(iOS 17, *) {
if #available(iOS 16, *) { NavigationStack {
NavigationStack { content
content }
} } else {
} else { NavigationView {
*/ content
NavigationView { }
content .navigationViewStyle(.stack)
} }
.navigationViewStyle(.stack)
// }
} }
} }