|
@@ -129,7 +129,7 @@ class TSGeneratePTPOperation: TSGenerateBaseOperation , @unchecked Sendable{
|
|
|
}
|
|
|
|
|
|
stopNetwork = false
|
|
|
- stateDatauPblished = (.start,nil)
|
|
|
+ stateDatauPblished = (.start,currentActionInfoModel)
|
|
|
|
|
|
stateDatauPblished = (.progressString(uploadingPhoto(progress: 0.0)),currentActionInfoModel)
|
|
|
uploadRequest = TSNetworkShared.uploadImage(upLoadImage: upLoadImage, maxKb: imageMaxKb) { [weak self] progress in
|
|
@@ -141,7 +141,7 @@ class TSGeneratePTPOperation: TSGenerateBaseOperation , @unchecked Sendable{
|
|
|
guard let self = self else { return }
|
|
|
if let error = error {
|
|
|
generateStyleModel.upLoadImageUrl = nil
|
|
|
- self.stateDatauPblished = (.failed(error.localizedDescription),nil)
|
|
|
+ self.stateDatauPblished = (.failed(error.localizedDescription),currentActionInfoModel)
|
|
|
complete(nil)
|
|
|
}else{
|
|
|
if let string = data as? String {
|
|
@@ -165,7 +165,7 @@ class TSGeneratePTPOperation: TSGenerateBaseOperation , @unchecked Sendable{
|
|
|
|
|
|
generatingProgress = 0
|
|
|
stopNetwork = false
|
|
|
- stateDatauPblished = (.start,nil)
|
|
|
+ stateDatauPblished = (.start,currentActionInfoModel)
|
|
|
|
|
|
|
|
|
currentActionInfoModel.status = "running"
|
|
@@ -199,7 +199,8 @@ class TSGeneratePTPOperation: TSGenerateBaseOperation , @unchecked Sendable{
|
|
|
if let dataDict = kNetWorkCodeSuccess(data: data),
|
|
|
let actionId = dataDict["actionId"] as? Int{
|
|
|
if stopNetwork == false {
|
|
|
- self.stateDatauPblished = (.pending,nil) //通知首页进行更新
|
|
|
+ self.stateDatauPblished = (.pending,currentActionInfoModel) //通知首页进行更新
|
|
|
+ self.stateDatauPblished = (.backstage(true),currentActionInfoModel) //通知允许进入后台生成
|
|
|
self.getActionInfo(action_id:actionId)
|
|
|
}
|
|
|
}else{
|