Browse Source

added SAVE AS SCAN

marinofaggiana 3 years ago
parent
commit
64c3a0c2c9
1 changed files with 17 additions and 0 deletions
  1. 17 0
      iOSClient/Menu/NCViewer+Menu.swift

+ 17 - 0
iOSClient/Menu/NCViewer+Menu.swift

@@ -164,6 +164,23 @@ extension NCViewer {
             )
         }
         
+        //
+        // SAVE AS SCAN
+        //
+        if #available(iOS 13.0, *) {
+            if (metadata.classFile == NCCommunicationCommon.typeClassFile.image.rawValue && metadata.contentType != "image/svg+xml") {
+                actions.append(
+                    NCMenuAction(
+                        title: NSLocalizedString("_save_as_scan_", comment: ""),
+                        icon: NCUtility.shared.loadImage(named: "viewfinder.circle"),
+                        action: { menuAction in
+                            NCFunctionCenter.shared.openDownload(metadata: metadata, selector: NCGlobal.shared.selectorSaveAsScan)
+                        }
+                    )
+                )
+            }
+        }
+        
         //
         // RENAME
         //