diff --git a/Ring/Ring/Calls/CallViewController.swift b/Ring/Ring/Calls/CallViewController.swift index 2db106542e536472abedbbfd476d8cb1bc9dcba8..24530c5511aad846ebf1f8afe9a4e873415c3300 100644 --- a/Ring/Ring/Calls/CallViewController.swift +++ b/Ring/Ring/Calls/CallViewController.swift @@ -241,13 +241,13 @@ class CallViewController: UIViewController, StoryboardBased, ViewModelBased, Con self.buttonsContainer.viewModel = self.viewModel.containerViewModel self.buttonsContainer.cancelButton.rx.tap .subscribe(onNext: { [weak self] in - self?.viewModel.cancelCall(stopProvider: true) + self?.viewModel.cancelCall() self?.removeFromScreen() }) .disposed(by: self.disposeBag) self.buttonsContainer.stopButton.rx.tap .subscribe(onNext: { [weak self] in - self?.viewModel.cancelCall(stopProvider: true) + self?.viewModel.cancelCall() self?.removeFromScreen() }) .disposed(by: self.disposeBag) diff --git a/Ring/Ring/Calls/CallViewModel.swift b/Ring/Ring/Calls/CallViewModel.swift index 4faad98c9a6cf39168a7d68ddc4e9d619942e916..91ae1edecec6e1f58c1c025eb167ed3706a7bd07 100644 --- a/Ring/Ring/Calls/CallViewModel.swift +++ b/Ring/Ring/Calls/CallViewModel.swift @@ -515,18 +515,7 @@ class CallViewModel: Stateable, ViewModel { // MARK: actions extension CallViewModel { - func cancelCall(stopProvider: Bool) { - guard let call = self.call else { - return - } - if stopProvider { - self.callsProvider.stopCall(callUUID: call.callUUID, participant: call.paricipantHash()) - call.participantsCallId.forEach { (callId) in - if let participantCall = self.callService.call(callID: callId) { - self.callsProvider.stopCall(callUUID: participantCall.callUUID, participant: participantCall.paricipantHash()) - } - } - } + func cancelCall() { self.callService .hangUpCallOrConference(callId: rendererId) .subscribe()