This commit is contained in:
Woit 2024-12-09 19:25:52 +01:00
parent bfb7bd00aa
commit ae767456dd
3 changed files with 4 additions and 1 deletions

View file

@ -25,6 +25,6 @@ class AppDelegate: UIResponder, UIApplicationDelegate {
}
func applicationDidEnterBackground(_: UIApplication) {
MLXMPPManager.sharedInstance().nowBackgrounded()
// MLXMPPManager.sharedInstance().nowBackgrounded()
}
}

View file

@ -63,6 +63,7 @@ final class WrapperChat: ObservableObject {
deinit {
notificationObservers.forEach { NotificationCenter.default.removeObserver($0) }
print("Chat wrapper deinit")
}
var chatTitle: String {
@ -139,6 +140,7 @@ private extension WrapperChat {
default:
guard let mlMessage = notification.userInfo?["message"] as? MLMessage else { return }
guard let message = Message(mlMessage) else { return }
guard message.accountId == contact.ownerId, message.participantJid == contact.contactJid else { return }
if let index = messages.firstIndex(where: { $0.id == message.id }) {
messages[index] = message
} else {

View file

@ -30,6 +30,7 @@ final class WrapperXMPP: ObservableObject {
deinit {
notificationObservers.forEach { NotificationCenter.default.removeObserver($0) }
print("XMPP wrapper deinit")
}
}