possible fix for ios 15
This commit is contained in:
parent
f93477e9a9
commit
61cab91a71
@ -76,14 +76,16 @@ struct NewChatView: View {
|
|||||||
.padding()
|
.padding()
|
||||||
|
|
||||||
VStack {
|
VStack {
|
||||||
switch selection {
|
// it seems there's a bug in iOS 15 if several views in switch (or if-else) statement have different transitions
|
||||||
case .invite:
|
// https://developer.apple.com/forums/thread/714977?answerId=731615022#731615022
|
||||||
|
if case .invite = selection {
|
||||||
prepareAndInviteView()
|
prepareAndInviteView()
|
||||||
.transition(.move(edge: .leading))
|
.transition(.move(edge: .leading))
|
||||||
.onAppear {
|
.onAppear {
|
||||||
createInvitation()
|
createInvitation()
|
||||||
}
|
}
|
||||||
case .connect:
|
}
|
||||||
|
if case .connect = selection {
|
||||||
ConnectView(showQRCodeScanner: showQRCodeScanner, pastedLink: $pastedLink, alert: $alert)
|
ConnectView(showQRCodeScanner: showQRCodeScanner, pastedLink: $pastedLink, alert: $alert)
|
||||||
.transition(.move(edge: .trailing))
|
.transition(.move(edge: .trailing))
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user