32 lines
796 B
Swift
32 lines
796 B
Swift
//
|
|
// Copyright 2020-2024 New Vector Ltd.
|
|
//
|
|
// SPDX-License-Identifier: AGPL-3.0-only
|
|
// Please see LICENSE in the repository root for full details.
|
|
//
|
|
|
|
import Foundation
|
|
|
|
class CallVCEnterPipOperation: AsyncOperation {
|
|
|
|
private var presenter: CallPresenter
|
|
private var callVC: UIViewController
|
|
private var completion: (() -> Void)?
|
|
|
|
init(presenter: CallPresenter,
|
|
callVC: UIViewController,
|
|
completion: (() -> Void)? = nil) {
|
|
self.presenter = presenter
|
|
self.callVC = callVC
|
|
self.completion = completion
|
|
}
|
|
|
|
override func main() {
|
|
presenter.delegate?.callPresenter(presenter, enterPipForCallViewController: callVC, completion: {
|
|
self.finish()
|
|
self.completion?()
|
|
})
|
|
}
|
|
|
|
}
|