瀏覽代碼

library: fix incorrect appearance of empty folders

Felix Paul Kühne 11 年之前
父節點
當前提交
f0ec8b0ba9
共有 2 個文件被更改,包括 2 次插入8 次删除
  1. 1 4
      Sources/VLCPlaylistCollectionViewCell.m
  2. 1 4
      Sources/VLCPlaylistTableViewCell.m

+ 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]]) {