Forráskód Böngészése

library: fix incorrect appearance of empty folders

Felix Paul Kühne 11 éve
szülő
commit
f0ec8b0ba9

+ 1 - 4
Sources/VLCPlaylistCollectionViewCell.m

@@ -182,10 +182,7 @@
         [self _configureForFolder:mediaObject];
 
         if ([keyPath isEqualToString:@"files"] || !keyPath || (!self.thumbnailView.image && [keyPath isEqualToString:@"editing"])) {
-            if (mediaObject.files.count == 0) {
-                self.thumbnailView.contentMode = UIViewContentModeScaleAspectFit;
-                self.thumbnailView.image = [UIImage imageNamed:@"folderIcon"];
-            } else
+            if (mediaObject.files.count != 0)
                 self.thumbnailView.image = [VLCThumbnailsCache thumbnailForLabel:mediaObject];
         }
     } else if ([self.mediaObject isKindOfClass:[MLAlbum class]]) {

+ 1 - 4
Sources/VLCPlaylistTableViewCell.m

@@ -160,10 +160,7 @@
         [self _configureForFolder:mediaObject];
 
         if ([keyPath isEqualToString:@"files"] || !keyPath || (!self.thumbnailView.image && [keyPath isEqualToString:@"editing"])) {
-            if (mediaObject.files.count == 0) {
-                self.thumbnailView.contentMode = UIViewContentModeScaleAspectFit;
-                self.thumbnailView.image = [UIImage imageNamed:@"folderIcon"];
-            } else
+            if (mediaObject.files.count != 0)
                 self.thumbnailView.image = [VLCThumbnailsCache thumbnailForLabel:mediaObject];
         }
     } else if ([self.mediaObject isKindOfClass:[MLAlbum class]]) {