浏览代码

Merge pull request #1954 from nextcloud/fix/voicerecorder

Voice memo timer starts before recording
Marino Faggiana 3 年之前
父节点
当前提交
ec9c8938b3
共有 1 个文件被更改,包括 1 次插入1 次删除
  1. 1 1
      iOSClient/Main/AudioRecorder/NCAudioRecorderViewController.swift

+ 1 - 1
iOSClient/Main/AudioRecorder/NCAudioRecorderViewController.swift

@@ -93,7 +93,6 @@ class NCAudioRecorderViewController: UIViewController, NCAudioRecorderDelegate {
 
         if recording.state == .record {
 
-            startDate = Date()
             recording.stop()
             voiceRecordHUD.update(0.0)
 
@@ -105,6 +104,7 @@ class NCAudioRecorderViewController: UIViewController, NCAudioRecorderDelegate {
 
             do {
                 try recording.record()
+                startDate = Date()
                 startStopLabel.text = NSLocalizedString("_voice_memo_stop_", comment: "")
             } catch {
                 print(error)