ios: fix view model update not on main thread

This commit is contained in:
Evgeny Poberezkin 2023-08-21 13:56:53 +01:00
parent c3ffc2abb8
commit 63dd6e36b3

View File

@ -1518,7 +1518,9 @@ func processReceivedMsg(_ res: ChatResponse) async {
await chatItemSimpleUpdate(user, aChatItem)
Task { cleanupFile(aChatItem) }
case let .callInvitation(invitation):
await MainActor.run {
m.callInvitations[invitation.contact.id] = invitation
}
activateCall(invitation)
case let .callOffer(_, contact, callType, offer, sharedKey, _):
await withCall(contact) { call in