marinofaggiana 4 år sedan
förälder
incheckning
979150d710
1 ändrade filer med 3 tillägg och 3 borttagningar
  1. 3 3
      iOSClient/Media/NCMedia.swift

+ 3 - 3
iOSClient/Media/NCMedia.swift

@@ -196,6 +196,7 @@ class NCMedia: UIViewController, DropdownMenuDelegate, DZNEmptyDataSetSource, DZ
                     icon: CCGraphics.changeThemingColorImage(UIImage(named: filterTypeFileImage ? "imageno" : "imageyes"), width: 50, height: 50, color: NCBrandColor.sharedInstance.icon),
                     action: { menuAction in
                         self.filterTypeFileImage = !self.filterTypeFileImage
+                        self.filterTypeFileVideo = false
                         self.reloadDataSource()
                     }
                 )
@@ -207,6 +208,7 @@ class NCMedia: UIViewController, DropdownMenuDelegate, DZNEmptyDataSetSource, DZ
                     icon: CCGraphics.changeThemingColorImage(UIImage(named: filterTypeFileVideo ? "videono" : "videoyes"), width: 50, height: 50, color: NCBrandColor.sharedInstance.icon),
                     action: { menuAction in
                         self.filterTypeFileVideo = !self.filterTypeFileVideo
+                        self.filterTypeFileImage = false
                         self.reloadDataSource()
                     }
                 )
@@ -522,9 +524,7 @@ extension NCMedia {
         
         var predicate: NSPredicate?
         
-        if filterTypeFileImage && filterTypeFileVideo { // HAS SENSE ???
-            predicate = NSPredicate(format: "account == %@ AND typeFile == ''", appDelegate.activeAccount)
-        } else if filterTypeFileImage {
+        if filterTypeFileImage {
             predicate = NSPredicate(format: "account == %@ AND typeFile == %@", appDelegate.activeAccount, k_metadataTypeFile_video)
         } else if filterTypeFileVideo {
             predicate = NSPredicate(format: "account == %@ AND typeFile == %@", appDelegate.activeAccount, k_metadataTypeFile_image)