wip
This commit is contained in:
parent
bfb7bd00aa
commit
ae767456dd
|
@ -25,6 +25,6 @@ class AppDelegate: UIResponder, UIApplicationDelegate {
|
|||
}
|
||||
|
||||
func applicationDidEnterBackground(_: UIApplication) {
|
||||
MLXMPPManager.sharedInstance().nowBackgrounded()
|
||||
// MLXMPPManager.sharedInstance().nowBackgrounded()
|
||||
}
|
||||
}
|
||||
|
|
|
@ -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 {
|
||||
|
|
|
@ -30,6 +30,7 @@ final class WrapperXMPP: ObservableObject {
|
|||
|
||||
deinit {
|
||||
notificationObservers.forEach { NotificationCenter.default.removeObserver($0) }
|
||||
print("XMPP wrapper deinit")
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue