Browse Source

Long press on an encrypted folder still shows delete folder

Signed-off-by: Marino Faggiana <marino@marinofaggiana.com>
Marino Faggiana 2 years ago
parent
commit
db5f40ed61
1 changed files with 6 additions and 1 deletions
  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])
         }