Commit 8322b478 authored by Kateryna Kostiuk's avatar Kateryna Kostiuk Committed by Andreas Traczyk

call: hide alert when call was stopped by peer

Change-Id: I67e6b092ac8c79c5d4e4c526d5d9cba2b9d8725f
Reviewed-by: Andreas Traczyk's avatarAndreas Traczyk <andreas.traczyk@savoirfairelinux.com>
parent 1e399596
......@@ -116,8 +116,14 @@ class ConversationsCoordinator: Coordinator, StateableResponsive, CallMakeable {
}).disposed(by: self.disposeBag)
alert.dismiss(animated: true, completion: nil)
}))
self.present(viewController: alert, withStyle: .present, withAnimation: true)
self.callService.currentCall.takeUntil(alert.rx.controllerWasDismissed).filter({ currentCall in
return currentCall.callId == call.callId &&
(currentCall.state == .over || currentCall.state == .failure)
}).subscribe(onNext: { _ in
alert.dismiss(animated: true, completion: nil)
}).disposed(by: self.disposeBag)
}
}
}
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment