marinofaggiana 4 lat temu
rodzic
commit
55c2fcc236

+ 6 - 3
iOSClient/Main/Collection/NCCollectionViewCommon.swift

@@ -653,11 +653,14 @@ class NCCollectionViewCommon: UIViewController, UIGestureRecognizerDelegate, UIS
         let touchPoint = gestureRecognizer.location(in: collectionView)
         let touchPoint = gestureRecognizer.location(in: collectionView)
         
         
         becomeFirstResponder()
         becomeFirstResponder()
+                
+        if metadataTouch != nil {
+            listMenuItems.append(UIMenuItem.init(title: NSLocalizedString("_copy_file_", comment: ""), action: #selector(copyFileMenu(_:))))
+        }
         
         
         listMenuItems.append(UIMenuItem.init(title: NSLocalizedString("_paste_file_", comment: ""), action: #selector(pasteFilesMenu(_:))))
         listMenuItems.append(UIMenuItem.init(title: NSLocalizedString("_paste_file_", comment: ""), action: #selector(pasteFilesMenu(_:))))
         
         
         if metadataTouch != nil {
         if metadataTouch != nil {
-            listMenuItems.append(UIMenuItem.init(title: NSLocalizedString("_copy_file_", comment: ""), action: #selector(copyFileMenu(_:))))
             listMenuItems.append(UIMenuItem.init(title: NSLocalizedString("_open_quicklook_", comment: ""), action: #selector(openQuickLookMenu(_:))))
             listMenuItems.append(UIMenuItem.init(title: NSLocalizedString("_open_quicklook_", comment: ""), action: #selector(openQuickLookMenu(_:))))
             if !NCBrandOptions.sharedInstance.disable_openin_file {
             if !NCBrandOptions.sharedInstance.disable_openin_file {
                 listMenuItems.append(UIMenuItem.init(title: NSLocalizedString("_open_in_", comment: ""), action: #selector(openInMenu(_:))))
                 listMenuItems.append(UIMenuItem.init(title: NSLocalizedString("_open_in_", comment: ""), action: #selector(openInMenu(_:))))
@@ -710,8 +713,8 @@ class NCCollectionViewCommon: UIViewController, UIGestureRecognizerDelegate, UIS
             
             
             if CCUtility.fileProviderStorageExists(metadata.ocId, fileNameView: metadata.fileNameView) {
             if CCUtility.fileProviderStorageExists(metadata.ocId, fileNameView: metadata.fileNameView) {
                 do {
                 do {
-                    let data = try NSKeyedArchiver.archivedData(withRootObject: metadata.ocId, requiringSecureCoding: false)
-                    items.append([k_metadataKeyedUnarchiver:data])
+                    let etagPasteboard = try NSKeyedArchiver.archivedData(withRootObject: metadata.ocId, requiringSecureCoding: false)
+                    items.append([k_metadataKeyedUnarchiver:etagPasteboard])
                 } catch {
                 } catch {
                     print("error")
                     print("error")
                 }
                 }

+ 2 - 2
iOSClient/Networking/NCNetworkingNotificationCenter.swift

@@ -103,8 +103,8 @@ import Foundation
                         var items = UIPasteboard.general.items
                         var items = UIPasteboard.general.items
                         
                         
                         do {
                         do {
-                            let data = try NSKeyedArchiver.archivedData(withRootObject: metadata.ocId, requiringSecureCoding: false)
-                            items.append([k_metadataKeyedUnarchiver:data])
+                            let etagPasteboard = try NSKeyedArchiver.archivedData(withRootObject: metadata.ocId, requiringSecureCoding: false)
+                            items.append([k_metadataKeyedUnarchiver:etagPasteboard])
                         } catch {
                         } catch {
                             print("error")
                             print("error")
                         }
                         }