possible fix for ios 15

This commit is contained in:
spaced4ndy 2023-12-05 11:53:23 +04:00
parent f93477e9a9
commit 61cab91a71

View File

@ -76,14 +76,16 @@ struct NewChatView: View {
.padding()
VStack {
switch selection {
case .invite:
// it seems there's a bug in iOS 15 if several views in switch (or if-else) statement have different transitions
// https://developer.apple.com/forums/thread/714977?answerId=731615022#731615022
if case .invite = selection {
prepareAndInviteView()
.transition(.move(edge: .leading))
.onAppear {
createInvitation()
}
case .connect:
}
if case .connect = selection {
ConnectView(showQRCodeScanner: showQRCodeScanner, pastedLink: $pastedLink, alert: $alert)
.transition(.move(edge: .trailing))
}