diff --git a/Classes/CallManager.swift b/Classes/CallManager.swift index f6458e9cc..e535f7ba2 100644 --- a/Classes/CallManager.swift +++ b/Classes/CallManager.swift @@ -642,13 +642,11 @@ import AVFoundation } } // post Notification kLinphoneCallUpdate - DispatchQueue.main.async { - NotificationCenter.default.post(name: Notification.Name("LinphoneCallUpdate"), object: self, userInfo: [ - AnyHashable("call"): NSValue.init(pointer:UnsafeRawPointer(call.getCobject)), - AnyHashable("state"): NSNumber(value: cstate.rawValue), - AnyHashable("message"): message - ]) - } + NotificationCenter.default.post(name: Notification.Name("LinphoneCallUpdate"), object: self, userInfo: [ + AnyHashable("call"): NSValue.init(pointer:UnsafeRawPointer(call.getCobject)), + AnyHashable("state"): NSNumber(value: cstate.rawValue), + AnyHashable("message"): message + ]) } diff --git a/Classes/PhoneMainView.m b/Classes/PhoneMainView.m index c8d78cd4f..6d9a05a7e 100644 --- a/Classes/PhoneMainView.m +++ b/Classes/PhoneMainView.m @@ -403,7 +403,7 @@ static RootViewManager *rootViewManagerInstance = nil; } case LinphoneCallEnd: { const MSList *calls = linphone_core_get_calls(LC); - if (!calls) { + if (!calls || calls->data == call) { while ((currentView == CallView.compositeViewDescription) || (currentView == CallIncomingView.compositeViewDescription) || (currentView == CallOutgoingView.compositeViewDescription)) {