diff --git a/Monal/Classes/AddContactMenu.swift b/Monal/Classes/AddContactMenu.swift index 3fb7967f9..bd3e9652d 100644 --- a/Monal/Classes/AddContactMenu.swift +++ b/Monal/Classes/AddContactMenu.swift @@ -326,7 +326,7 @@ struct AddContactMenu: View { } }) .sheet(isPresented: $showQRCodeScanner) { - NavigationView { + NavigationStack { MLQRCodeScanner(handleClose: { self.showQRCodeScanner = false }) diff --git a/Monal/Classes/DebugView.swift b/Monal/Classes/DebugView.swift index 1baa24f99..3c75872a4 100644 --- a/Monal/Classes/DebugView.swift +++ b/Monal/Classes/DebugView.swift @@ -196,7 +196,7 @@ struct DebugView: View { } #Preview { - NavigationView { + NavigationStack { DebugView() } } diff --git a/Monal/Classes/EditGroupSubject.swift b/Monal/Classes/EditGroupSubject.swift index c017ed114..bff4ebdf1 100644 --- a/Monal/Classes/EditGroupSubject.swift +++ b/Monal/Classes/EditGroupSubject.swift @@ -23,7 +23,7 @@ struct EditGroupSubject: View { } var body: some View { - NavigationView { + NavigationStack { VStack { Form { Section(header: Text("Group Description (optional)")) { diff --git a/Monal/Classes/RegisterAccount.swift b/Monal/Classes/RegisterAccount.swift index 73cabbad3..0c0fe31c8 100644 --- a/Monal/Classes/RegisterAccount.swift +++ b/Monal/Classes/RegisterAccount.swift @@ -436,7 +436,7 @@ struct RegisterAccount: View { } .frame(maxWidth: .infinity) .sheet(isPresented: $showWebView) { - NavigationView { + NavigationStack { WebView(url: termsSiteForCurrentLanguage()) .navigationBarTitle(Text("Terms of \(RegisterAccount.XMPPServer[$selectedServerIndex.wrappedValue]["XMPPServer"]!)"), displayMode: .inline) .toolbar(content: { diff --git a/Monal/Classes/SwiftuiHelpers.swift b/Monal/Classes/SwiftuiHelpers.swift index 99ae5933d..02fd33b20 100644 --- a/Monal/Classes/SwiftuiHelpers.swift +++ b/Monal/Classes/SwiftuiHelpers.swift @@ -508,7 +508,7 @@ struct LazyClosureView: View { } } -// use this to wrap a view into NavigationView, if it should be the outermost swiftui view of a new view stack +// use this to wrap a view into NavigationStack, if it should be the outermost swiftui view of a new view stack struct AddTopLevelNavigation: View { let build: () -> Content let delegate: SheetDismisserProtocol @@ -517,7 +517,7 @@ struct AddTopLevelNavigation: View { self.delegate = delegate } var body: some View { - NavigationView { + NavigationStack { build() .navigationBarTitleDisplayMode(.automatic) .navigationBarBackButtonHidden(true) // will not be shown because swiftui does not know we navigated here from UIKit @@ -527,7 +527,6 @@ struct AddTopLevelNavigation: View { Image(systemName: "arrow.backward") }.keyboardShortcut(.escape, modifiers: [])) } - .navigationViewStyle(.stack) } } @@ -547,11 +546,10 @@ struct UIKitWorkaround: View { #if targetEnvironment(macCatalyst) build().navigationBarTitleDisplayMode(.inline) #else - NavigationView { + NavigationStack { build() .navigationBarTitleDisplayMode(.automatic) } - .navigationViewStyle(.stack) #endif }