Browse Source

Library: disable 'Swipe to Delete' if not in 'All Files' mode

Felix Paul Kühne 12 years ago
parent
commit
6e85e48f40
1 changed files with 8 additions and 0 deletions
  1. 8 0
      AspenProject/VLCPlaylistViewController.m

+ 8 - 0
AspenProject/VLCPlaylistViewController.m

@@ -419,6 +419,14 @@
         [self.tableView setEditing:editing animated:YES];
 }
 
+- (UITableViewCellEditingStyle)tableView:(UITableView *)aTableView editingStyleForRowAtIndexPath:(NSIndexPath *)indexPath
+{
+    if (_libraryMode != kVLCLibraryModeAllFiles)
+        return UITableViewCellEditingStyleNone;
+
+    return UITableViewCellEditingStyleDelete;
+}
+
 - (IBAction)leftButtonAction:(id)sender
 {
     [[(VLCAppDelegate*)[UIApplication sharedApplication].delegate revealController] toggleSidebar:![(VLCAppDelegate*)[UIApplication sharedApplication].delegate revealController].sidebarShowing duration:kGHRevealSidebarDefaultAnimationDuration];