Преглед изворни кода

第一次录制返回后是voiceStickers为空的也要加入

jsonwang пре 3 година
родитељ
комит
dbb23eb5b2

+ 5 - 3
BFRecordScreenKit/Classes/RecordScreen/Controller/BFRecordScreenController.swift

@@ -2833,10 +2833,12 @@ extension BFRecordScreenController: BFTTSManagerDelegte{
         let findRecordId = itemModels[Int(model.itemModelIndex)].voiceStickers.first { temp in
             temp.recordId == model.recordId
         }
-        if(findRecordId != nil){
+        //第一次录制返回后是voiceStickers为空的也要加入
+        if(itemModels[Int(model.itemModelIndex)].voiceStickers.count == 0){
+            itemModels[Int(model.itemModelIndex)].voiceChangeStickers.append(voice)
+            
+        }else if(itemModels[Int(model.itemModelIndex)].voiceStickers.count > 0 && findRecordId != nil){
             itemModels[Int(model.itemModelIndex)].voiceChangeStickers.append(voice)
-        }else{
-            BFLog(message: "返回TTS 任务 录制段已经不存在,不加入")
         }
      
         //显示当前段的转换进度isExportAction