Browse Source

Aspen: somewhat improve the table view content

Felix Paul Kühne 12 years ago
parent
commit
7b01e875a0
1 changed files with 3 additions and 4 deletions
  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;
 }