32 lines
794 B
Swift
32 lines
794 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 CallVCExitPipOperation: 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, exitPipForCallViewController: callVC, completion: {
|
|
self.finish()
|
|
self.completion?()
|
|
})
|
|
}
|
|
|
|
}
|