marinofaggiana 4 years ago
parent
commit
3b7a597e8d
1 changed files with 2 additions and 2 deletions
  1. 2 2
      iOSClient/Menu/NCCollectionViewCommon+Menu.swift

+ 2 - 2
iOSClient/Menu/NCCollectionViewCommon+Menu.swift

@@ -28,7 +28,7 @@ import NCCommunication
 
 extension NCCollectionViewCommon {
 
-    func toggleMenu(viewController: UIViewController, metadata: tableMetadata, image: UIImage?) {
+    func toggleMenu(viewController: NCCollectionViewCommon, metadata: tableMetadata, image: UIImage?) {
         
         let menuViewController = UIStoryboard.init(name: "NCMenu", bundle: nil).instantiateInitialViewController() as! NCMenu
         var actions = [NCMenuAction]()
@@ -284,7 +284,7 @@ extension NCCollectionViewCommon {
         //
         // USE AS BACKGROUND
         //
-        if metadata.typeFile == NCGlobal.shared.metadataTypeFileImage {
+        if metadata.typeFile == NCGlobal.shared.metadataTypeFileImage && viewController.layoutKey == NCGlobal.shared.layoutViewFiles {
             actions.append(
                 NCMenuAction(
                     title: NSLocalizedString("_use_as_background_", comment: ""),