marinofaggiana 5 年之前
父節點
當前提交
b8da829e5f
共有 3 個文件被更改,包括 5 次插入21 次删除
  1. 1 1
      iOSClient/CCGlobal.h
  2. 2 1
      iOSClient/Favorites/CCFavorites.m
  3. 2 19
      iOSClient/Main/NCMainCommon.swift

+ 1 - 1
iOSClient/CCGlobal.h

@@ -193,8 +193,8 @@
 #define selectorDownloadSynchronize                     @"downloadSynchronize"
 #define selectorDownloadEditPhoto                       @"downloadEditPhoto"
 #define selectorLoadFileView                            @"loadFileView"
+#define selectorLoadFileViewFavorite                            @"loadFileViewFavorite"
 #define selectorLoadFileInternalView                    @"loadFileInternalView"
-#define selectorLoadViewImage                           @"loadViewImage"
 #define selectorLoadCopy                                @"loadCopy"
 #define selectorLoadOffline                             @"loadOffline"
 #define selectorOpenIn                                  @"openIn"

+ 2 - 1
iOSClient/Favorites/CCFavorites.m

@@ -631,7 +631,7 @@
                         
                     self.metadata.session = k_download_session;
                     self.metadata.sessionError = @"";
-                    self.metadata.sessionSelector = selectorLoadFileView;
+                    self.metadata.sessionSelector = selectorLoadFileViewFavorite;
                     self.metadata.status = k_metadataStatusWaitDownload;
                         
                     // Add Metadata for Download
@@ -700,6 +700,7 @@
     
     detailViewController.metadata = self.metadataForPushDetail;
     detailViewController.selector = self.selectorForPushDetail;
+    detailViewController.favorite = true;
     
     [detailViewController setTitle:self.metadata.fileNameView];
 }

+ 2 - 19
iOSClient/Main/NCMainCommon.swift

@@ -1320,7 +1320,7 @@ class NCNetworkingMain: NSObject, CCNetworkingDelegate, IMImagemeterViewerDelega
             }
             
             // open View File
-            if (selector == selectorLoadFileView || selector == selectorLoadFileInternalView) && UIApplication.shared.applicationState == UIApplication.State.active {
+            if (selector == selectorLoadFileView || selector == selectorLoadFileViewFavorite || selector == selectorLoadFileInternalView) && UIApplication.shared.applicationState == UIApplication.State.active {
             
                 var uti = CCUtility.insertTypeFileIconName(metadata.fileNameView, metadata: metadata)
                 if uti == nil {
@@ -1387,15 +1387,7 @@ class NCNetworkingMain: NSObject, CCNetworkingDelegate, IMImagemeterViewerDelega
                 
                 NCManageDatabase.sharedInstance.setLocalFile(ocId: metadata.ocId, offline: true)
             }
-            
-            //selectorLoadViewImage
-            if selector == selectorLoadViewImage {
-                
-//                if appDelegate.activeDetail != nil {
-//                    appDelegate.activeDetail.downloadPhotoBrowserSuccessFailure(metadata, selector: selector, errorCode: errorCode)
-//                }
-            }
-            
+                        
             appDelegate.startLoadAutoDownloadUpload()
             
         } else {
@@ -1412,15 +1404,6 @@ class NCNetworkingMain: NSObject, CCNetworkingDelegate, IMImagemeterViewerDelega
                 
                 NCMainCommon.sharedInstance.reloadDatasource(ServerUrl: serverUrl, ocId: ocId, action: Int32(k_action_DEL))
             }
-            
-            if selector == selectorLoadViewImage {
-                
-//                if appDelegate.activeDetail.view.window != nil {
-//                    appDelegate.activeDetail.downloadPhotoBrowserSuccessFailure(metadata, selector: selector, errorCode: errorCode)
-//                }
-                
-                NCMainCommon.sharedInstance.reloadDatasource(ServerUrl: serverUrl, ocId: ocId, action: Int32(k_action_MOD))
-            }
         }
         
         appDelegate.startLoadAutoDownloadUpload()