mirror of
https://github.com/simplex-chat/simplex-chat.git
synced 2026-04-05 06:45:49 +00:00
ios: Testing workaround of a crash
This commit is contained in:
@@ -17,7 +17,7 @@ struct ChatListView: View {
|
||||
@State private var showAddChat = false
|
||||
|
||||
var body: some View {
|
||||
NavigationView {
|
||||
NavStackWorkaround {
|
||||
VStack {
|
||||
if chatModel.chats.isEmpty {
|
||||
onboardingButtons()
|
||||
|
||||
@@ -64,3 +64,16 @@ extension View {
|
||||
modifier(SheetForItem(item: item, onDismiss: onDismiss, sheetContent: content))
|
||||
}
|
||||
}
|
||||
|
||||
struct NavStackWorkaround<T: View>: View {
|
||||
let content: ()->T
|
||||
|
||||
var body: some View {
|
||||
if #available(iOS 16, *) {
|
||||
NavigationStack(root: content)
|
||||
} else {
|
||||
NavigationView(content: content)
|
||||
.navigationViewStyle(.stack)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user