This commit is contained in:
Woit 2024-11-28 18:04:59 +01:00
parent ca5e4b930c
commit 598b07661c
3 changed files with 10 additions and 1 deletions

View file

@ -112,5 +112,10 @@ struct ConversationScreen: View {
ConversationTextInput(autoScroll: $autoScroll) ConversationTextInput(autoScroll: $autoScroll)
.environmentObject(chatWrapper) .environmentObject(chatWrapper)
} }
.onLoad {
if chatWrapper.messages.isEmpty {
chatWrapper.requestMAM()
}
}
} }
} }

View file

@ -67,6 +67,7 @@ struct LoginScreen: View {
) )
Button { Button {
UIApplication.shared.sendAction(#selector(UIResponder.resignFirstResponder), to: nil, from: nil, for: nil)
router.showModal { router.showModal {
LoadingScreen() LoadingScreen()
} }

View file

@ -289,7 +289,10 @@ private extension MonalChatWrapper {
return Message(message) return Message(message)
} }
.sorted { $0.timestamp > $1.timestamp } .sorted { $0.timestamp > $1.timestamp }
self.messages = messages DispatchQueue.main.async { [weak self] in
self?.messages = messages
}
} }
func toggleOmemo(_ new: Bool) { func toggleOmemo(_ new: Bool) {