ios: don't go back when system alert appears (#1903)

This commit is contained in:
Stanislav Dmitrenko
2023-02-06 19:33:45 +03:00
committed by GitHub
parent d048962959
commit 0339b399f7

View File

@@ -16,6 +16,7 @@ struct ChatView: View {
@EnvironmentObject var chatModel: ChatModel
@Environment(\.colorScheme) var colorScheme
@Environment(\.dismiss) var dismiss
@Environment(\.presentationMode) var presentationMode
@State @ObservedObject var chat: Chat
@State private var showChatInfoSheet: Bool = false
@State private var showAddMembersSheet: Bool = false
@@ -77,7 +78,7 @@ struct ChatView: View {
if chatModel.chatId == nil { dismiss() }
}
.onDisappear {
if chatModel.chatId == cInfo.id {
if chatModel.chatId == cInfo.id && !presentationMode.wrappedValue.isPresented {
chatModel.chatId = nil
DispatchQueue.main.asyncAfter(deadline: .now() + 0.35) {
if chatModel.chatId == nil {