浏览代码

Merge branch 'master' of https://git.yishihui.com/iOS/BFRecordScreenKit

* 'master' of https://git.yishihui.com/iOS/BFRecordScreenKit:
  1,修改字幕修改后未生效问题 2,去掉警告代码
harry 3 年之前
父节点
当前提交
6920e38167
共有 1 个文件被更改,包括 5 次插入4 次删除
  1. 5 4
      BFRecordScreenKit/Classes/RecordScreen/Controller/BFRecordScreenController.swift

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

@@ -684,6 +684,7 @@ public class BFRecordScreenController: BFBaseViewController {
                 } else {
                     // 更新数据
                     wself.itemModels[wself.currItemModelIndex ].titleStickers[index].text = newtext
+                    wself.subtitleLabel.text = newtext
                 }
             }
 
@@ -2529,13 +2530,13 @@ public extension BFRecordScreenController {
         DispatchQueue.main.async {[weak self] in
             guard let wself = self else { return }
             
-            if !(wself.isRecording ?? false), CMTimeCompare((wself.currentAssetProgress ?? .zero), (wself.itemModels[wself.currItemModelIndex ?? 0].materialDuraion ?? .zero)) > 0 {
+            if !(wself.isRecording), CMTimeCompare((wself.currentAssetProgress), (wself.itemModels[wself.currItemModelIndex].materialDuraion  )) > 0 {
                 return
             }
 //            BFLog(1, message: "更新录音进度\(#function)-\(wself.currentAssetProgress.seconds ?? 0)")
-            wself.progreddL.text = String(format: "%@", (wself.currentAssetProgress.seconds ?? 0).formatDurationToHMS())
-            wself.progressThumV.progress = (wself.currentAssetProgress.seconds ?? 0)
-            wself.updateSubtitle(time: wself.currentAssetProgress ?? CMTime.zero)
+            wself.progreddL.text = String(format: "%@", (wself.currentAssetProgress.seconds).formatDurationToHMS())
+            wself.progressThumV.progress = (wself.currentAssetProgress.seconds)
+            wself.updateSubtitle(time: wself.currentAssetProgress)
         }
     }