diff --git a/CHANGES.rst b/CHANGES.rst index 45ed2aabe..04c0012ef 100644 --- a/CHANGES.rst +++ b/CHANGES.rst @@ -8,6 +8,7 @@ Changes to be released in next version * 🐛 Bugfix + * VoIP: Do not present ended calls. * More fixes to Main.storyboard layout on iPhone 12 Pro Max (#4527) ⚠️ API Changes diff --git a/Riot/Managers/Call/CallPresenter.swift b/Riot/Managers/Call/CallPresenter.swift index 4f5ad7e13..940ac98f3 100644 --- a/Riot/Managers/Call/CallPresenter.swift +++ b/Riot/Managers/Call/CallPresenter.swift @@ -393,7 +393,9 @@ class CallPresenter: NSObject { if let oldCallVC = self.callVCs.values.first, self.presentedCallVC == nil, !self.uiOperationQueue.containsPresentCallVCOperation, - !self.uiOperationQueue.containsEnterPiPOperation { + !self.uiOperationQueue.containsEnterPiPOperation, + let oldCall = oldCallVC.mxCall, + oldCall.state != .ended { // present the call screen after dismissing this one self.presentCallVC(oldCallVC) }