浏览代码

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

Felix Paul Kühne 12 年之前
父节点
当前提交
6e85e48f40
共有 1 个文件被更改,包括 8 次插入0 次删除
  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];