Commit cb73e88f authored by CZ1004's avatar CZ1004

【修复】修复压缩进程BUG

parent 2e214446
...@@ -46,6 +46,7 @@ class CompressingViewController: BaseViewController { ...@@ -46,6 +46,7 @@ class CompressingViewController: BaseViewController {
}() }()
let alert = EmailContentDelAlert(state: .endCompress) let alert = EmailContentDelAlert(state: .endCompress)
var alertShow : Bool = false
lazy var animationView : LottieAnimationView = { lazy var animationView : LottieAnimationView = {
let animationView = LottieAnimationView(name: "iOS压缩完成") let animationView = LottieAnimationView(name: "iOS压缩完成")
...@@ -107,6 +108,7 @@ class CompressingViewController: BaseViewController { ...@@ -107,6 +108,7 @@ class CompressingViewController: BaseViewController {
self.view.hideBlur() self.view.hideBlur()
} }
self.alert.show() self.alert.show()
self.alertShow = true
} }
setUI() setUI()
...@@ -196,18 +198,26 @@ class CompressingViewController: BaseViewController { ...@@ -196,18 +198,26 @@ class CompressingViewController: BaseViewController {
/// - comVideoDataSource: 压缩后的视频链接数组 /// - comVideoDataSource: 压缩后的视频链接数组
fileprivate func updateNextView(_ compressAllSize: Double,_ comDataSource : [Data],_ comVideoDataSource : [URL]) { fileprivate func updateNextView(_ compressAllSize: Double,_ comDataSource : [Data],_ comVideoDataSource : [URL]) {
DispatchQueue.main.async { DispatchQueue.main.async {
self.view.hideBlur() if self.alertShow {
self.alert.dismiss(animated: true) { self.view.hideBlur()
let vc = CompressCompletedViewController() self.alert.dismiss(animated: true) {
vc.currentMediaType = self.currentMediaType self.jumpNextPage(compressAllSize,comDataSource,comVideoDataSource)
vc.comDataSource = comDataSource }
vc.comVideoDataSource = comVideoDataSource }else {
vc.model = self.model self.jumpNextPage(compressAllSize,comDataSource,comVideoDataSource)
vc.completedSize = compressAllSize
self.navigationController?.pushViewController(vc, animated: true)
} }
} }
} }
func jumpNextPage(_ compressAllSize: Double,_ comDataSource : [Data],_ comVideoDataSource : [URL]){
let vc = CompressCompletedViewController()
vc.currentMediaType = self.currentMediaType
vc.comDataSource = comDataSource
vc.comVideoDataSource = comVideoDataSource
vc.model = self.model
vc.completedSize = compressAllSize
self.navigationController?.pushViewController(vc, animated: true)
}
// MARK: 设置UI // MARK: 设置UI
......
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