marinofaggiana 5 years ago
parent
commit
2512b4863f
1 changed files with 19 additions and 19 deletions
  1. 19 19
      iOSClient/Main/NCDetailViewController.swift

+ 19 - 19
iOSClient/Main/NCDetailViewController.swift

@@ -281,7 +281,7 @@ class NCDetailViewController: UIViewController {
         }
     }
     
-    @objc func uploadFile(_ notification: NSNotification) {
+    @objc func renameFile(_ notification: NSNotification) {
         if let userInfo = notification.userInfo as NSDictionary? {
             if let metadata = userInfo["metadata"] as? tableMetadata, let errorCode = userInfo["errorCode"] as? Int {
                 
@@ -295,28 +295,17 @@ class NCDetailViewController: UIViewController {
                     } else {
                         viewUnload()
                     }
-                }
-            }
-        }
-    }
-    
-    @objc func downloadFile(_ notification: NSNotification) {
-        if let userInfo = notification.userInfo as NSDictionary? {
-            if let metadata = userInfo["metadata"] as? tableMetadata, let errorCode = userInfo["errorCode"] as? Int {
-                
-                if metadata.account == self.metadata?.account && metadata.serverUrl == self.metadata?.serverUrl {
                     
-                    if errorCode == 0 && metadata.typeFile == k_metadataTypeFile_image && viewerImageViewController != nil {
-                        viewerImageViewController?.reloadContentViews()
-                    }
+                // OTHER SINGLE FILE TYPE
+                } else if metadata.ocId == self.metadata?.ocId {
                     
-                    setProgressBar()
+                    self.navigationController?.navigationBar.topItem?.title = metadata.fileNameView
                 }
             }
         }
     }
     
-    @objc func renameFile(_ notification: NSNotification) {
+    @objc func uploadFile(_ notification: NSNotification) {
         if let userInfo = notification.userInfo as NSDictionary? {
             if let metadata = userInfo["metadata"] as? tableMetadata, let errorCode = userInfo["errorCode"] as? Int {
                 
@@ -330,11 +319,22 @@ class NCDetailViewController: UIViewController {
                     } else {
                         viewUnload()
                     }
+                }
+            }
+        }
+    }
+    
+    @objc func downloadFile(_ notification: NSNotification) {
+        if let userInfo = notification.userInfo as NSDictionary? {
+            if let metadata = userInfo["metadata"] as? tableMetadata, let errorCode = userInfo["errorCode"] as? Int {
+                
+                if metadata.account == self.metadata?.account && metadata.serverUrl == self.metadata?.serverUrl {
                     
-                // OTHER SINGLE FILE TYPE
-                } else if metadata.ocId == self.metadata?.ocId {
+                    if errorCode == 0 && metadata.typeFile == k_metadataTypeFile_image && viewerImageViewController != nil {
+                        viewerImageViewController?.reloadContentViews()
+                    }
                     
-                    self.navigationController?.navigationBar.topItem?.title = metadata.fileNameView
+                    setProgressBar()
                 }
             }
         }