Browse Source

Fix context menu don't show details if not available

Signed-off-by: Henrik Storch <henrik.storch@nextcloud.com>
Henrik Storch 3 years ago
parent
commit
6950341b6b
1 changed files with 3 additions and 2 deletions
  1. 3 2
      iOSClient/Main/NCFunctionCenter.swift

+ 3 - 2
iOSClient/Main/NCFunctionCenter.swift

@@ -742,9 +742,9 @@ import SVGKit
 
         // DIR
 
-        if metadata.directory {
-
+        guard !metadata.directory else {
             let 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])
         }
 
@@ -781,6 +781,7 @@ import SVGKit
         }
 
         let submenu = UIMenu(title: "", options: .displayInline, children: children)
+        guard appDelegate.disableSharesView == false else { return submenu }
         return UIMenu(title: "", children: [detail, submenu])
     }
 }