소스 검색

有录制再合成

harry 3 년 전
부모
커밋
7eb5c61ae8
1개의 변경된 파일5개의 추가작업 그리고 4개의 파일을 삭제
  1. 5 4
      Introduce/Record/INIntroduceController.swift

+ 5 - 4
Introduce/Record/INIntroduceController.swift

@@ -118,10 +118,11 @@ class INIntroduceController: BFBaseViewController {
     }
 
     @objc func exportAction() {
-        if recordScreenVC.itemModels.count == 1
-            && recordScreenVC.itemModels[0].mediaType == .IMAGE
-            && recordScreenVC.itemModels[0].voiceStickers.count == 0{
-            cShowHUB(superView: nil, msg: "开局一张图也要编些话吧:)")
+        let count = recordScreenVC.itemModels.reduce(0, { partialResult, model in
+            model.voiceStickers.count + partialResult
+        })
+        if count == 0 {
+            cShowHUB(superView: nil, msg: "需要添加录制才能合成")
             return
         }