浏览代码

图片撤销时的录音指示绘制修复

harry 3 年之前
父节点
当前提交
dc4c220dd5
共有 1 个文件被更改,包括 4 次插入3 次删除
  1. 4 3
      BFRecordScreenKit/Classes/RecordScreen/Controller/BFRecordScreenController.swift

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

@@ -943,7 +943,7 @@ public class BFRecordScreenController: BFBaseViewController {
                 }) {
                     let model = itemModels[currItemModelIndex].voiceStickers[modelIndex]
                     itemModels[currItemModelIndex].voiceStickers.remove(at: modelIndex)
-                    // 移除
+                    // 移除音频
                     indirectionView?.deleteItem(index: modelIndex)
                     var tuples = action.deletedVoices
                     if tuples != nil, tuples!.count > 0 {
@@ -1010,7 +1010,8 @@ public class BFRecordScreenController: BFBaseViewController {
                 changeWithDrawBtnLayout(false)
             }
             searchStopAtRecordRange()
-            indirectionView?.resetAllSubViews(items: itemModels[currItemModelIndex].voiceStickers, totalDuration: itemModels[currItemModelIndex].materialDuraion)
+            indirectionView?.resetAllSubViews(items: itemModels[currItemModelIndex].voiceStickers, percenWidth: progressThumV.thumbImageWidth / 2.0, totalDuration: itemModels[currItemModelIndex].materialDuraion)
+
         }
     }
     
@@ -1477,7 +1478,7 @@ public class BFRecordScreenController: BFBaseViewController {
                 }
             }
         } else {
-            if itemModels[currItemModelIndex].materialDuraion > 0 {
+            if itemModels[currItemModelIndex].materialDuraion >= 0 {
                 currentAssetProgress = CMTime(value: CMTimeValue(progress * Float(itemModels[currItemModelIndex].materialDuraion) * 1000), timescale: 1000)
                 DispatchQueue.main.async { [weak self] in
                     self?.progreddL.text = String(format: "%@", CMTimeGetSeconds(self!.currentAssetProgress).formatDurationToHMS())