Browse Source

Create : NCNetworkingMain

Marino Faggiana 6 years ago
parent
commit
879d95449f
1 changed files with 17 additions and 21 deletions
  1. 17 21
      iOSClient/Main/CCMain.m

+ 17 - 21
iOSClient/Main/CCMain.m

@@ -675,27 +675,6 @@
     [CCMenuAccount dismissMenu];
 }
 
-#pragma --------------------------------------------------------------------------------------------
-#pragma mark ===== Open In ... =====
-#pragma --------------------------------------------------------------------------------------------
-
-- (void)openIn:(tableMetadata *)metadata
-{
-    NSURL *url = [NSURL fileURLWithPath:[CCUtility getDirectoryProviderStorageFileID:metadata.fileID fileNameView:metadata.fileNameView]];
-
-    UIDocumentInteractionController *docController = [UIDocumentInteractionController interactionControllerWithURL:url];
-    docController.delegate = self;
-    
-    NSIndexPath *indexPath = [sectionDataSource.fileIDIndexPath objectForKey:metadata.fileID];
-    CCCellMain *cell = [self.tableView cellForRowAtIndexPath:indexPath];
-    
-    if (cell) {
-        [docController presentOptionsMenuFromRect:cell.frame inView:self.tableView animated:YES];
-    } else {
-        [docController presentOptionsMenuFromRect:self.view.frame inView:self.view animated:YES];
-    }
-}
-
 #pragma --------------------------------------------------------------------------------------------
 #pragma mark ===== Document Picker =====
 #pragma --------------------------------------------------------------------------------------------
@@ -2456,6 +2435,23 @@
     [[NCMainCommon sharedInstance] reloadDatasourceWithServerUrl:self.serverUrl fileID:metadata.fileID action:k_action_MOD];
 }
 
+- (void)openIn:(tableMetadata *)metadata
+{
+    NSURL *url = [NSURL fileURLWithPath:[CCUtility getDirectoryProviderStorageFileID:metadata.fileID fileNameView:metadata.fileNameView]];
+    
+    UIDocumentInteractionController *docController = [UIDocumentInteractionController interactionControllerWithURL:url];
+    docController.delegate = self;
+    
+    NSIndexPath *indexPath = [sectionDataSource.fileIDIndexPath objectForKey:metadata.fileID];
+    CCCellMain *cell = [self.tableView cellForRowAtIndexPath:indexPath];
+    
+    if (cell) {
+        [docController presentOptionsMenuFromRect:cell.frame inView:self.tableView animated:YES];
+    } else {
+        [docController presentOptionsMenuFromRect:self.view.frame inView:self.view animated:YES];
+    }
+}
+
 #pragma --------------------------------------------------------------------------------------------
 #pragma mark ===== Order Table & GroupBy & DirectoryOnTop =====
 #pragma --------------------------------------------------------------------------------------------