浏览代码

improvements code

marinofaggiana 4 年之前
父节点
当前提交
ada9276ac3
共有 2 个文件被更改,包括 2 次插入10 次删除
  1. 1 5
      iOSClient/Menu/NCCollectionViewCommon+Menu.swift
  2. 1 5
      iOSClient/Menu/NCViewer+Menu.swift

+ 1 - 5
iOSClient/Menu/NCCollectionViewCommon+Menu.swift

@@ -174,11 +174,7 @@ extension NCCollectionViewCommon {
                     title: NSLocalizedString("_print_", comment: ""),
                     title: NSLocalizedString("_print_", comment: ""),
                     icon: NCUtility.shared.loadImage(named: "printer"),
                     icon: NCUtility.shared.loadImage(named: "printer"),
                     action: { menuAction in
                     action: { menuAction in
-                        if CCUtility.fileProviderStorageExists(metadata.ocId, fileNameView: metadata.fileNameView) {
-                            NCFunctionCenter.shared.printDocument(metadata: metadata)
-                        } else {
-                            NCOperationQueue.shared.download(metadata: metadata, selector: NCGlobal.shared.selectorPrint)
-                        }
+                        NCFunctionCenter.shared.openDownload(metadata: metadata, selector: NCGlobal.shared.selectorPrint)
                     }
                     }
                 )
                 )
             )
             )

+ 1 - 5
iOSClient/Menu/NCViewer+Menu.swift

@@ -127,11 +127,7 @@ extension NCViewer {
                     title: NSLocalizedString("_print_", comment: ""),
                     title: NSLocalizedString("_print_", comment: ""),
                     icon: NCUtility.shared.loadImage(named: "printer"),
                     icon: NCUtility.shared.loadImage(named: "printer"),
                     action: { menuAction in
                     action: { menuAction in
-                        if CCUtility.fileProviderStorageExists(metadata.ocId, fileNameView: metadata.fileNameView) {
-                            NCFunctionCenter.shared.printDocument(metadata: metadata)
-                        } else {
-                            NCOperationQueue.shared.download(metadata: metadata, selector: NCGlobal.shared.selectorPrint)
-                        }
+                        NCFunctionCenter.shared.openDownload(metadata: metadata, selector: NCGlobal.shared.selectorPrint)
                     }
                     }
                 )
                 )
             )
             )