fix: streamline AI retouch submission feedback
This commit is contained in:
@@ -458,29 +458,14 @@ final class TravelAlbumDetailViewController: BaseViewController {
|
||||
materialIds: materialIds
|
||||
),
|
||||
api: api,
|
||||
onSubmitted: { [weak self] submission in
|
||||
guard let self else { return }
|
||||
self.viewModel.completeAIRetouchSubmission()
|
||||
self.presentAIRetouchSubmitted(submission)
|
||||
}
|
||||
onSubmitted: { [weak self] _ in self?.handleAIRetouchSubmitted() }
|
||||
)
|
||||
present(controller, animated: true)
|
||||
}
|
||||
|
||||
private func presentAIRetouchSubmitted(_ submission: TravelAlbumAIJobSubmission) {
|
||||
let alert = UIAlertController(
|
||||
title: "AI修图任务已提交",
|
||||
message: "完成后将通过消息通知,你也可以随时查看处理进度。",
|
||||
preferredStyle: .alert
|
||||
)
|
||||
alert.addAction(UIAlertAction(title: "稍后查看", style: .cancel))
|
||||
alert.addAction(UIAlertAction(title: "查看任务", style: .default) { [weak self] _ in
|
||||
self?.navigationController?.pushViewController(
|
||||
TravelAlbumAIJobDetailViewController(batchId: submission.aiRetouchBatchId),
|
||||
animated: true
|
||||
)
|
||||
})
|
||||
present(alert, animated: true)
|
||||
private func handleAIRetouchSubmitted() {
|
||||
showToast("AI修图任务已提交,完成后将通过消息通知")
|
||||
Task { await viewModel.refreshAfterAIRetouchSubmission(api: api) }
|
||||
}
|
||||
|
||||
@objc private func deleteSelectedTapped() {
|
||||
@@ -533,7 +518,8 @@ final class TravelAlbumDetailViewController: BaseViewController {
|
||||
},
|
||||
onProjectDeleted: { materialId in
|
||||
previewViewModel.removeMaterialAfterPreviewDeletion(id: materialId)
|
||||
}
|
||||
},
|
||||
onAIRetouchSubmitted: { [weak self] in self?.handleAIRetouchSubmitted() }
|
||||
)
|
||||
present(controller, animated: true)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user