diff --git a/Monal/another.im/Views/Conversation/ConversationScreen.swift b/Monal/another.im/Views/Conversation/ConversationScreen.swift index 50d1be6..8c247a5 100644 --- a/Monal/another.im/Views/Conversation/ConversationScreen.swift +++ b/Monal/another.im/Views/Conversation/ConversationScreen.swift @@ -112,5 +112,10 @@ struct ConversationScreen: View { ConversationTextInput(autoScroll: $autoScroll) .environmentObject(chatWrapper) } + .onLoad { + if chatWrapper.messages.isEmpty { + chatWrapper.requestMAM() + } + } } } diff --git a/Monal/another.im/Views/Enter/LoginScreen.swift b/Monal/another.im/Views/Enter/LoginScreen.swift index 01604ac..e055f70 100644 --- a/Monal/another.im/Views/Enter/LoginScreen.swift +++ b/Monal/another.im/Views/Enter/LoginScreen.swift @@ -67,6 +67,7 @@ struct LoginScreen: View { ) Button { + UIApplication.shared.sendAction(#selector(UIResponder.resignFirstResponder), to: nil, from: nil, for: nil) router.showModal { LoadingScreen() } diff --git a/Monal/another.im/XMPP/MonalXmppWrapper.swift b/Monal/another.im/XMPP/MonalXmppWrapper.swift index e8094d7..2e52ee3 100644 --- a/Monal/another.im/XMPP/MonalXmppWrapper.swift +++ b/Monal/another.im/XMPP/MonalXmppWrapper.swift @@ -289,7 +289,10 @@ private extension MonalChatWrapper { return Message(message) } .sorted { $0.timestamp > $1.timestamp } - self.messages = messages + DispatchQueue.main.async { [weak self] in + self?.messages = messages + + } } func toggleOmemo(_ new: Bool) {