Introduce CallBar view management

This commit is contained in:
ismailgulek
2020-12-02 23:17:06 +03:00
parent c2e616b870
commit 50feecc4df
11 changed files with 366 additions and 116 deletions
@@ -19,19 +19,22 @@ import Foundation
class CallBarPresentOperation: AsyncOperation {
private var service: CallService
private var callVC: CallViewController
private var activeCallVC: CallViewController?
private var numberOfPausedCalls: UInt
private var completion: (() -> Void)?
init(service: CallService,
callVC: CallViewController,
activeCallVC: CallViewController?,
numberOfPausedCalls: UInt,
completion: (() -> Void)? = nil) {
self.service = service
self.callVC = callVC
self.activeCallVC = activeCallVC
self.numberOfPausedCalls = numberOfPausedCalls
self.completion = completion
}
override func main() {
service.delegate?.callService(service, presentCallBarFor: callVC, completion: {
service.delegate?.callService(service, presentCallBarFor: activeCallVC, numberOfPausedCalls: numberOfPausedCalls, completion: {
self.finish()
self.completion?()
})