marinofaggiana 4 лет назад
Родитель
Сommit
ea710f819a

+ 1 - 1
iOSClient/Brand/NCBrand.swift

@@ -46,7 +46,7 @@ import UIKit
     }()
     
     @objc public var brand:                             String = "Nextcloud"
-    @objc public var mailMe:                            String = "ios@nextcloud.com"
+    //@objc public var mailMe:                            String = "ios@nextcloud.com"                              // Deprecated
     @objc public var textCopyrightNextcloudiOS:         String = "Nextcloud Coherence for iOS %@ © 2021"
     @objc public var textCopyrightNextcloudServer:      String = "Nextcloud Server %@"
     @objc public var loginBaseUrl:                      String = "https://cloud.nextcloud.com"

+ 2 - 2
iOSClient/Main/Create cloud/NCCreateFormUploadAssets.swift

@@ -41,6 +41,8 @@ class NCCreateFormUploadAssets: XLFormViewController, NCSelectDelegate {
     let targetSizeImagePreview = CGSize(width:100, height: 100)
     let appDelegate = UIApplication.shared.delegate as! AppDelegate
     
+    // MARK: - View Life Cycle
+
     convenience init(serverUrl: String, assets: [PHAsset], cryptated: Bool, session: String, delegate: createFormUploadAssetsDelegate?) {
         
         self.init()
@@ -66,8 +68,6 @@ class NCCreateFormUploadAssets: XLFormViewController, NCSelectDelegate {
         requestOptions.isSynchronous = true
     }
     
-    // MARK: - View Life Cycle
-
     override func viewDidLoad() {
         
         super.viewDidLoad()

+ 3 - 3
iOSClient/Main/Create cloud/NCCreateFormUploadScanDocument.swift

@@ -45,6 +45,8 @@ class NCCreateFormUploadScanDocument: XLFormViewController, NCSelectDelegate, NC
     
     let appDelegate = UIApplication.shared.delegate as! AppDelegate
     
+    // MARK: - View Life Cycle
+
     convenience init(serverUrl: String, arrayImages: [UIImage]) {
         
         self.init()
@@ -58,9 +60,7 @@ class NCCreateFormUploadScanDocument: XLFormViewController, NCSelectDelegate, NC
         self.serverUrl = serverUrl
         self.arrayImages = arrayImages
     }
-    
-    // MARK: - View Life Cycle
-    
+        
     override func viewDidLoad() {
         
         super.viewDidLoad()

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

@@ -43,29 +43,6 @@ class NCCreateFormUploadVoiceNote: XLFormViewController, NCSelectDelegate, AVAud
 
     let appDelegate = UIApplication.shared.delegate as! AppDelegate
     
-    public func setup(serverUrl: String, fileNamePath: String, fileName: String) {
-    
-        if serverUrl == NCUtilityFileSystem.shared.getHomeServer(urlBase: appDelegate.urlBase, account: appDelegate.account) {
-            titleServerUrl = "/"
-        } else {
-            titleServerUrl = (serverUrl as NSString).lastPathComponent
-        }
-    
-        self.fileName = fileName
-        self.serverUrl = serverUrl
-        self.fileNamePath = fileNamePath
-        
-        // player
-        do {
-            try audioPlayer = AVAudioPlayer(contentsOf: URL(fileURLWithPath: fileNamePath))
-            audioPlayer.prepareToPlay()
-            audioPlayer.delegate = self
-            durationPlayer = TimeInterval(audioPlayer.duration)
-        } catch {
-            buttonPlayStop.isEnabled = false
-        }
-    }
-    
     // MARK: - View Life Cycle
 
     override func viewDidLoad() {
@@ -102,6 +79,29 @@ class NCCreateFormUploadVoiceNote: XLFormViewController, NCSelectDelegate, AVAud
         updateTimerUI()
     }
     
+    public func setup(serverUrl: String, fileNamePath: String, fileName: String) {
+    
+        if serverUrl == NCUtilityFileSystem.shared.getHomeServer(urlBase: appDelegate.urlBase, account: appDelegate.account) {
+            titleServerUrl = "/"
+        } else {
+            titleServerUrl = (serverUrl as NSString).lastPathComponent
+        }
+    
+        self.fileName = fileName
+        self.serverUrl = serverUrl
+        self.fileNamePath = fileNamePath
+        
+        // player
+        do {
+            try audioPlayer = AVAudioPlayer(contentsOf: URL(fileURLWithPath: fileNamePath))
+            audioPlayer.prepareToPlay()
+            audioPlayer.delegate = self
+            durationPlayer = TimeInterval(audioPlayer.duration)
+        } catch {
+            buttonPlayStop.isEnabled = false
+        }
+    }
+    
     //MARK: XLForm
 
     func initializeForm() {