Browse Source

3.6.1(8)提测

100Years 1 month ago
parent
commit
e885c29995

+ 2 - 2
AIEmoji.xcodeproj/project.pbxproj

@@ -2416,7 +2416,7 @@
 				ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor;
 				CLANG_ENABLE_MODULES = YES;
 				CODE_SIGN_STYLE = Automatic;
-				CURRENT_PROJECT_VERSION = 7;
+				CURRENT_PROJECT_VERSION = 8;
 				DEVELOPMENT_TEAM = 65UD255J84;
 				ENABLE_USER_SCRIPT_SANDBOXING = NO;
 				GENERATE_INFOPLIST_FILE = YES;
@@ -2455,7 +2455,7 @@
 				ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor;
 				CLANG_ENABLE_MODULES = YES;
 				CODE_SIGN_STYLE = Automatic;
-				CURRENT_PROJECT_VERSION = 7;
+				CURRENT_PROJECT_VERSION = 8;
 				DEVELOPMENT_TEAM = 65UD255J84;
 				ENABLE_USER_SCRIPT_SANDBOXING = NO;
 				GENERATE_INFOPLIST_FILE = YES;

+ 2 - 2
AIEmoji/Assets.xcassets/PTP/ptp_example_image0.imageset/Contents.json

@@ -5,12 +5,12 @@
       "scale" : "1x"
     },
     {
-      "filename" : "壁纸 4@2x.png",
+      "filename" : "ptp_example_image0@2x.png",
       "idiom" : "universal",
       "scale" : "2x"
     },
     {
-      "filename" : "壁纸 4@3x.png",
+      "filename" : "ptp_example_image0@3x.png",
       "idiom" : "universal",
       "scale" : "3x"
     }

BIN
AIEmoji/Assets.xcassets/PTP/ptp_example_image0.imageset/ptp_example_image0@2x.png


BIN
AIEmoji/Assets.xcassets/PTP/ptp_example_image0.imageset/ptp_example_image0@3x.png


BIN
AIEmoji/Assets.xcassets/PTP/ptp_example_image0.imageset/壁纸 4@2x.png


BIN
AIEmoji/Assets.xcassets/PTP/ptp_example_image0.imageset/壁纸 4@3x.png


BIN
AIEmoji/Assets.xcassets/PTP/ptp_example_image1.imageset/ptp_example_image1@2x.png


BIN
AIEmoji/Assets.xcassets/PTP/ptp_example_image1.imageset/ptp_example_image1@3x.png


+ 2 - 0
AIEmoji/Business/Data/TSDBHistoryManager.swift

@@ -113,8 +113,10 @@ class TSDBHistory: Object {
                     listModels[index] = dbModel// 如果找到,替换该元素
                 }
             } else {
+                print("Thread.current insert1=\(Thread.current)")
                 TSRMShared.writeThread {
                     listModels.insert(dbModel, at: 0)// 如果没有找到,添加到末尾
+                    print("Thread.current insert2=\(Thread.current)")
                 }
             }
     }

+ 8 - 4
AIEmoji/Business/TSAILIstVC/TSAIPhotoGeneratorBaseVC/TSAIPhotoGeneratorBaseVM/TSAIListPhotoGeneratorBaseVM.swift

@@ -149,10 +149,14 @@ class TSAIListPhotoGeneratorBaseVM {
                             "right":generatorModel.expandEdge.right
                            ]
             case .photoQuality:
-                urlType = .overResolution
-                postDict = ["imageUrl":imageUrl,
-                            "device":getUserInfoJsonString()
-                           ]
+//                urlType = .overResolution
+//                postDict = ["imageUrl":imageUrl,
+//                            "device":getUserInfoJsonString()
+//                           ]
+                urlType = .imageRewrite
+                postDict = ["prompt":"提高上传图片的清晰度",
+                            "imageUrl":imageUrl,
+                            "device":getUserInfoJsonString()]
         }
         creatRequest = TSNetworkShared.post(urlType: urlType,parameters: postDict) { [weak self] data,error in
             guard let self = self else { return }

+ 6 - 4
AIEmoji/Business/TSGenmojiVC/TSGenmojiVC/View/TSGenmojiItemCell.swift

@@ -78,10 +78,12 @@ class TSGenmojiItemCell: TSBaseCollectionCell ,TSSimpleConfigurableView {
                 delegate?.collectionView(didTrigger: TSSimpleCellEvent(action: .buttonTapped("delete_task_expired"), indexPath: indexPath ?? IndexPath(item: 0, section: 0), data: self.dataModel))
             }else{
                 if kJudgeVipFreeType(vipFreeNumType: .picToPic){ return }
-                let generatePTPOperation = TSGeneratePTPOperationQueue.shared.creatOperation(uuid: dataModel.uuid)
-                generatePTPOperation.isSaveDB = true
-                generatePTPOperation.creatImage(oldModel: dataModel)
-                generateView.setProgress(progress: 0)
+                if TSGeneratePTPOperationQueue.shared.isAvailability {
+                    let generatePTPOperation = TSGeneratePTPOperationQueue.shared.creatOperation(uuid: dataModel.uuid)
+                    generatePTPOperation.isSaveDB = true
+                    generatePTPOperation.creatImage(oldModel: dataModel)
+                    generateView.setProgress(progress: 0)
+                }
             }
         }
         return generateView

+ 1 - 3
AIEmoji/Business/TSPTPGeneratorVC/TSAIPhotoGeneratorBaseVC/TSAIPhotoBrowseVC.swift

@@ -152,8 +152,7 @@ class TSAIPhotoBrowseVC: TSBaseVC {
                             debugPrint(error)
                         }
                     }
-                }else{//
-                    
+                }else{//如果服务器取不到,直接保存当前显示的图片
                     if let currentImage = self.currentImage {
                         PhotoManagerShared.saveImageToAlbum(currentImage) { success, error in
                             if success {
@@ -164,7 +163,6 @@ class TSAIPhotoBrowseVC: TSBaseVC {
                         }
                     }
                 }
-                
             }
         }
     }

+ 11 - 10
AIEmoji/Business/TSPTPGeneratorVC/TSPTPInputVC/TSPTPInputVC.swift

@@ -332,23 +332,24 @@ class TSPTPInputVC: TSBaseVC {
 
             if let userInfo = notification.userInfo as? [String: Any],let state = userInfo["state"] as? TSProgressState {
                 dePrint("TSBaseOperation stateDatauPblished 收到 = \(state)")
-                
-                if state.isResult {//有结果,一定要刷新
+//                if state.isResult {//有结果,一定要刷新
+//                    updataCollectionView()
+//                }else if self.isViewVisible == false {
+////                    dePrint("TSBaseOperation 视图不可见")
+//                    return
+//                }else
+//                if state.reloadNewData {//主要是给pending用,让他再视图中有个位置占着
                     updataCollectionView()
-                }else if self.isViewVisible == false {
-//                    dePrint("TSBaseOperation 视图不可见")
-                    return
-                }else
-                if state.reloadNewData {//主要是给pending用,让他再视图中有个位置占着
-                    updataCollectionView()
-                }
+//                }
             }
         }
         
         //同时 VC主动刷新UI界面
         NotificationCenter.default.addObserver(forName: .kPTPDataChanged, object: nil, queue: nil) { [weak self] notification in
             guard let self = self else { return }
-            updataCollectionView()
+            DispatchQueue.main.async {
+                self.updataCollectionView()
+            }
         }
     }
     

+ 9 - 2
AIEmoji/Business/TSSetingVC/SetingVC/View/TSSettingListView.swift

@@ -6,12 +6,12 @@
 //
 
 import SwiftUI
-
+import SwiftUIX
 struct TSSettingListView: View {
     @ObservedObject var viewModel: TSSetingViewModel
     var publisher: ListEventPublisher
     var body: some View {
-        ScrollView {
+        CocoaScrollView {
 //            Color.clear
             VStack(spacing: 0) {
                 Spacer().frame(height: 16)
@@ -39,10 +39,17 @@ struct TSSettingListView: View {
             .padding(.horizontal)
             Spacer().frame(height: 20)
         }
+        .alwaysBounceVertical(true)
+        .scrollIndicatorStyle(HiddenScrollViewIndicatorStyle())
+        
+    
+        
     }
 }
 
 
+
+
 struct SettingListItemView: View {
     var type : SettingType
     var viewModel: TSSetingViewModel

+ 1 - 1
AIEmoji/Res/photo_to_photo_style.json

@@ -235,7 +235,7 @@
     },
     {
         "imageName": "ptp_style_disney",
-        "imageText": "Cute",
+        "imageText": "Disney",
         "prompt":"把图片变成disney风格",
         "specialStyle":0,
         "isVip": true