소스 검색

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: ""),
                     icon: NCUtility.shared.loadImage(named: "printer"),
                     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: ""),
                     icon: NCUtility.shared.loadImage(named: "printer"),
                     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)
                     }
                 )
             )