소스 검색

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