marinofaggiana 5 lat temu
rodzic
commit
32cc63560a

+ 4 - 1
iOSClient/AudioRecorder/NCAudioRecorderViewController.swift

@@ -31,6 +31,7 @@ import QuartzCore
 
 @objc protocol NCAudioRecorderViewControllerDelegate : class {
     func didFinishRecording(_ viewController: NCAudioRecorderViewController, fileName: String)
+    func didFinishWithoutRecording(_ viewController: NCAudioRecorderViewController, fileName: String)
 }
 
 class NCAudioRecorderViewController: UIViewController , NCAudioRecorderDelegate {
@@ -82,7 +83,9 @@ class NCAudioRecorderViewController: UIViewController , NCAudioRecorderDelegate
         if recording.state == .record {
             startStop()
         } else {
-            dismiss(animated: true, completion: nil)
+            dismiss(animated: true) {
+                self.delegate?.didFinishWithoutRecording(self, fileName: self.fileName)
+            }
         }
     }
     

+ 1 - 1
iOSClient/Brand/File_Provider_Extension.plist

@@ -17,7 +17,7 @@
 	<key>CFBundlePackageType</key>
 	<string>XPC!</string>
 	<key>CFBundleShortVersionString</key>
-	<string>2.24.3</string>
+	<string>2.24.4</string>
 	<key>CFBundleVersion</key>
 	<string>1</string>
 	<key>NSAppTransportSecurity</key>

+ 1 - 1
iOSClient/Brand/Share.plist

@@ -17,7 +17,7 @@
 	<key>CFBundlePackageType</key>
 	<string>XPC!</string>
 	<key>CFBundleShortVersionString</key>
-	<string>2.24.3</string>
+	<string>2.24.4</string>
 	<key>CFBundleVersion</key>
 	<string>1</string>
 	<key>NSAppTransportSecurity</key>

+ 1 - 1
iOSClient/Brand/iOSClient.plist

@@ -46,7 +46,7 @@
 	<key>CFBundlePackageType</key>
 	<string>APPL</string>
 	<key>CFBundleShortVersionString</key>
-	<string>2.24.3</string>
+	<string>2.24.4</string>
 	<key>CFBundleSignature</key>
 	<string>????</string>
 	<key>CFBundleURLTypes</key>

+ 1 - 1
iOSClient/Main/Create cloud/NCCreateFormUploadVoiceNote.swift

@@ -37,7 +37,7 @@ class NCCreateFormUploadVoiceNote: XLFormViewController, NCSelectDelegate, AVAud
     private var durationPlayer: TimeInterval = 0
     private var counterSecondPlayer: TimeInterval = 0
     
-    private var audioPlayer = AVAudioPlayer()
+    private var audioPlayer: AVAudioPlayer!
     private var timer = Timer()
 
     let appDelegate = UIApplication.shared.delegate as! AppDelegate

+ 2 - 1
iOSClient/Main/NCMainCommon.swift

@@ -28,7 +28,6 @@ import ZIPFoundation
 //MARK: - Main Common
 
 class NCMainCommon: NSObject, PhotoEditorDelegate, NCAudioRecorderViewControllerDelegate, UIDocumentInteractionControllerDelegate {
-    
     @objc static let sharedInstance: NCMainCommon = {
         let instance = NCMainCommon()
         instance.createImagesThemingColor()
@@ -1147,6 +1146,8 @@ class NCMainCommon: NSObject, PhotoEditorDelegate, NCAudioRecorderViewController
         self.appDelegate.window.rootViewController?.present(viewController, animated: true, completion: nil)
     }
     
+    func didFinishWithoutRecording(_ viewController: NCAudioRecorderViewController, fileName: String) { }
+
     func didFinishRecording(_ viewController: NCAudioRecorderViewController, fileName: String) {
         
         guard let navigationController = UIStoryboard(name: "NCCreateFormUploadVoiceNote", bundle: nil).instantiateInitialViewController() else { return }