|
@@ -28,6 +28,7 @@ class TSGeneratePTPOperationQueue: TSGenerateBaseOperationQueue {
|
|
|
|
|
|
}
|
|
|
|
|
|
+
|
|
|
class TSGeneratePTPOperation: TSGenerateBaseOperation , @unchecked Sendable{
|
|
|
|
|
|
//是否展示成功后的 View 提醒
|
|
@@ -58,26 +59,54 @@ class TSGeneratePTPOperation: TSGenerateBaseOperation , @unchecked Sendable{
|
|
|
currentActionInfoModelChanged?(currentActionInfoModel)
|
|
|
}
|
|
|
|
|
|
+// override func handleGenerateSuccess() {
|
|
|
+// kPurchaseDefault.useOnceForFree(type: .picToPic)
|
|
|
+//
|
|
|
+// if isShowSuccessView == false {
|
|
|
+// return
|
|
|
+// }
|
|
|
+//
|
|
|
+// guard let window = WindowHelper.getKeyWindow() else {
|
|
|
+// debugPrint("getKeyWindow nil")
|
|
|
+// return
|
|
|
+// }
|
|
|
+//
|
|
|
+// guard let rootVC = WindowHelper.topViewController() else {
|
|
|
+// debugPrint("handleGenerateSuccess topViewController nil")
|
|
|
+// return
|
|
|
+// }
|
|
|
+//
|
|
|
+// let copyModel = self.currentActionInfoModel.copy()
|
|
|
+// if let rootVC = WindowHelper.getCurrentViewController() ,let cyModel = copyModel as? TSActionInfoModel {
|
|
|
+// kSaveSuccesswShared.show(atView: rootVC.view,text: "Successfully generated".localized,deadline: 5.0,bottom: kSaveSuccesswShared.getBottom(topY: k_Nav_Height+10)) {
|
|
|
+// let gennerateVC = TSPTPGeneratorVC(generateStyleModel: TSGenerateOnlineStyleModel(),infoModel: cyModel) { model in }
|
|
|
+// gennerateVC.modalPresentationStyle = .overFullScreen
|
|
|
+// gennerateVC.modalTransitionStyle = .crossDissolve
|
|
|
+// rootVC.present(gennerateVC, animated: true)
|
|
|
+// }
|
|
|
+// }else{
|
|
|
+// debugPrint("copyModel as? TSActionInfoModel error")
|
|
|
+// }
|
|
|
+// }
|
|
|
+
|
|
|
override func handleGenerateSuccess() {
|
|
|
kPurchaseDefault.useOnceForFree(type: .picToPic)
|
|
|
-
|
|
|
+ Self.saveCurrentActionInfoModel = self.currentActionInfoModel
|
|
|
if isShowSuccessView == false {
|
|
|
return
|
|
|
}
|
|
|
|
|
|
-
|
|
|
- guard let window = WindowHelper.getKeyWindow() else {
|
|
|
+ guard let _ = WindowHelper.getKeyWindow() else {
|
|
|
debugPrint("getKeyWindow nil")
|
|
|
return
|
|
|
}
|
|
|
|
|
|
- guard let rootVC = WindowHelper.topViewController() else {
|
|
|
+ guard let _ = WindowHelper.topViewController() else {
|
|
|
debugPrint("handleGenerateSuccess topViewController nil")
|
|
|
return
|
|
|
}
|
|
|
|
|
|
- let copyModel = self.currentActionInfoModel.copy()
|
|
|
- if let rootVC = WindowHelper.getCurrentViewController() ,let cyModel = copyModel as? TSActionInfoModel {
|
|
|
+ if let rootVC = WindowHelper.getCurrentViewController() ,let cyModel = Self.saveCurrentActionInfoModel {
|
|
|
kSaveSuccesswShared.show(atView: rootVC.view,text: "Successfully generated".localized,deadline: 5.0,bottom: kSaveSuccesswShared.getBottom(topY: k_Nav_Height+10)) {
|
|
|
let gennerateVC = TSPTPGeneratorVC(generateStyleModel: TSGenerateOnlineStyleModel(),infoModel: cyModel) { model in }
|
|
|
gennerateVC.modalPresentationStyle = .overFullScreen
|
|
@@ -88,7 +117,6 @@ class TSGeneratePTPOperation: TSGenerateBaseOperation , @unchecked Sendable{
|
|
|
debugPrint("copyModel as? TSActionInfoModel error")
|
|
|
}
|
|
|
}
|
|
|
-
|
|
|
|
|
|
/**
|
|
|
1.用户上传图片
|