Explorar el Código

Long press on an encrypted folder still shows delete folder

Signed-off-by: Marino Faggiana <marino@marinofaggiana.com>
Marino Faggiana hace 2 años
padre
commit
db5f40ed61
Se han modificado 1 ficheros con 6 adiciones y 1 borrados
  1. 6 1
      iOSClient/Main/NCFunctionCenter.swift

+ 6 - 1
iOSClient/Main/NCFunctionCenter.swift

@@ -748,7 +748,12 @@ import Photos
         // DIR
 
         guard !metadata.directory else {
-            let submenu = UIMenu(title: "", options: .displayInline, children: [favorite, offline, rename, moveCopy, copyPath, delete])
+            var submenu = UIMenu()
+            if !isDirectoryE2EE && metadata.e2eEncrypted {
+                submenu = UIMenu(title: "", options: .displayInline, children: [favorite, offline, rename, moveCopy, copyPath])
+            } else {
+                submenu = UIMenu(title: "", options: .displayInline, children: [favorite, offline, rename, moveCopy, copyPath, delete])
+            }
             guard appDelegate.disableSharesView == false else { return submenu }
             return UIMenu(title: "", children: [detail, submenu])
         }