marinofaggiana 5 年之前
父节点
当前提交
4465ee4c70

+ 10 - 8
iOSClient/Main/Menu/NCDetailNavigationController+Menu.swift

@@ -75,15 +75,17 @@ extension NCDetailNavigationController {
             )
         )
         
-        actions.append(
-            NCMenuAction(title: NSLocalizedString("_open_in_", comment: ""),
-                icon: CCGraphics.changeThemingColorImage(UIImage(named: "openFile"), width: 50, height: 50, color: NCBrandColor.sharedInstance.icon),
-                action: { menuAction in
-                    NCMainCommon.sharedInstance.downloadOpen(metadata: metadata, selector: selectorOpenInDetail)
-                }
+        if metadata.session == "" {
+            actions.append(
+                NCMenuAction(title: NSLocalizedString("_open_in_", comment: ""),
+                    icon: CCGraphics.changeThemingColorImage(UIImage(named: "openFile"), width: 50, height: 50, color: NCBrandColor.sharedInstance.icon),
+                    action: { menuAction in
+                        NCMainCommon.sharedInstance.downloadOpen(metadata: metadata, selector: selectorOpenInDetail)
+                    }
+                )
             )
-        )
-
+        }
+        
         actions.append(
             NCMenuAction(
                 title: NSLocalizedString("_rename_", comment: ""),

+ 2 - 1
iOSClient/Utility/NCContentPresenter.swift

@@ -52,7 +52,8 @@ class NCContentPresenter: NSObject {
     @objc func messageNotification(_ title: String, description: String?, delay: TimeInterval, type: messageType, errorCode: Int) {
                        
         // No notification message
-        if errorCode == -999 { return }
+        if errorCode == -999 { return }         // Cancelled transfer
+        else if errorCode == -1001 { return }   // Time out
         else if errorCode == 0 { return }
         
         // No repeat message