From 868f326bbc66dda32b56b631a24b7209f7fd43a7 Mon Sep 17 00:00:00 2001 From: Woit Date: Mon, 9 Dec 2024 19:53:56 +0100 Subject: [PATCH] wip --- Monal/another.im/Views/Conversation/ConversationScreen.swift | 2 +- Monal/another.im/Views/Main/ChatList/ChatsListScreen.swift | 3 +-- Monal/another.im/Views/Main/Contacts/ContactsScreen.swift | 3 +-- 3 files changed, 3 insertions(+), 5 deletions(-) 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) } } }