diff --git a/Monal/another.im/Views/Conversation/ConversationScreen.swift b/Monal/another.im/Views/Conversation/ConversationScreen.swift index 4271e9e..f741b5e 100644 --- a/Monal/another.im/Views/Conversation/ConversationScreen.swift +++ b/Monal/another.im/Views/Conversation/ConversationScreen.swift @@ -4,7 +4,7 @@ import SwiftUI struct ConversationScreen: View { @Environment(\.router) var router - @EnvironmentObject var chatWrapper: WrapperChat + @StateObject var chatWrapper: WrapperChat @State private var autoScroll = true @State private var firstIsVisible = true diff --git a/Monal/another.im/Views/Main/ChatList/ChatsListScreen.swift b/Monal/another.im/Views/Main/ChatList/ChatsListScreen.swift index 59d004d..0d28754 100644 --- a/Monal/another.im/Views/Main/ChatList/ChatsListScreen.swift +++ b/Monal/another.im/Views/Main/ChatList/ChatsListScreen.swift @@ -65,9 +65,8 @@ private struct ChatsRow: View { } router.showScreen(.push) { _ in - ConversationScreen() + ConversationScreen(chatWrapper: model) .navigationBarHidden(true) - .environmentObject(model) } } catch { router.showAlert( diff --git a/Monal/another.im/Views/Main/Contacts/ContactsScreen.swift b/Monal/another.im/Views/Main/Contacts/ContactsScreen.swift index 41de39f..fc0b385 100644 --- a/Monal/another.im/Views/Main/Contacts/ContactsScreen.swift +++ b/Monal/another.im/Views/Main/Contacts/ContactsScreen.swift @@ -138,9 +138,8 @@ private struct ContactsScreenRow: View { return } router.showScreen(.push) { _ in - ConversationScreen() + ConversationScreen(chatWrapper: model) .navigationBarHidden(true) - .environmentObject(model) } } }