浏览代码

Aspen: somewhat improve the table view content

Felix Paul Kühne 12 年之前
父节点
当前提交
7b01e875a0
共有 1 个文件被更改,包括 3 次插入4 次删除
  1. 3 4
      AspenProject/VLCPlaylistViewController.m

+ 3 - 4
AspenProject/VLCPlaylistViewController.m

@@ -87,14 +87,13 @@
 
     UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:CellIdentifier];
     if (cell == nil) {
-        cell = [[[UITableViewCell alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:CellIdentifier] autorelease];
-        if ([[UIDevice currentDevice] userInterfaceIdiom] == UIUserInterfaceIdiomPhone) {
-            cell.accessoryType = UITableViewCellAccessoryDisclosureIndicator;
-        }
+        cell = [[[UITableViewCell alloc] initWithStyle:UITableViewCellStyleSubtitle reuseIdentifier:CellIdentifier] autorelease];
     }
 
     MLFile *object = _foundMedia[indexPath.row];
     cell.textLabel.text = object.title;
+    cell.detailTextLabel.text = [NSString stringWithFormat:@"%@ — %.2f MB", [VLCTime timeWithNumber:[object duration]], [object fileSizeInBytes] / 2e6];
+    cell.imageView.image = object.computedThumbnail;
     return cell;
 }