Explorar o código

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

Felix Paul Kühne %!s(int64=12) %!d(string=hai) anos
pai
achega
6e85e48f40
Modificáronse 1 ficheiros con 8 adicións e 0 borrados
  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];