修复任务提交与弹窗交互问题
This commit is contained in:
@ -267,10 +267,26 @@ final class MaterialFormViewController: BaseViewController {
|
||||
sheet.addAction(UIAlertAction(title: "从相册选择", style: .default) { [weak self] _ in
|
||||
self?.presentPhotoPicker()
|
||||
})
|
||||
if target == .material {
|
||||
sheet.addAction(UIAlertAction(title: "从云盘导入", style: .default) { [weak self] _ in
|
||||
self?.openCloudPicker()
|
||||
})
|
||||
}
|
||||
sheet.addAction(UIAlertAction(title: "取消", style: .cancel))
|
||||
present(sheet, animated: true)
|
||||
}
|
||||
|
||||
private func openCloudPicker() {
|
||||
let controller = CloudStoragePickForTaskViewController(
|
||||
importedFileIDs: viewModel.importedCloudFileIDs,
|
||||
allowedFileType: viewModel.mediaType.cloudFileType
|
||||
)
|
||||
controller.onConfirmed = { [weak self] files in
|
||||
self?.viewModel.addCloudMediaFiles(files)
|
||||
}
|
||||
navigationController?.pushViewController(controller, animated: true)
|
||||
}
|
||||
|
||||
private func presentPhotoPicker() {
|
||||
var configuration = PHPickerConfiguration(photoLibrary: .shared())
|
||||
if pickTarget == .cover {
|
||||
|
||||
Reference in New Issue
Block a user