]> git.saurik.com Git - cydia.git/commitdiff
Use the argument from commitEditingStyle.
authorJay Freeman (saurik) <saurik@saurik.com>
Fri, 4 Mar 2011 21:59:01 +0000 (13:59 -0800)
committerJay Freeman (saurik) <saurik@saurik.com>
Mon, 7 Mar 2011 10:41:36 +0000 (02:41 -0800)
MobileCydia.mm

index 296e7c346f5c076ebf8a92d44c92b00f70c431a1..bebae78e8af2a91c610903be88540e871a0f5d40 100644 (file)
@@ -8177,9 +8177,11 @@ bool DepSubstrate(const pkgCache::VerIterator &iterator) {
 }
 
 - (void) tableView:(UITableView *)tableView commitEditingStyle:(UITableViewCellEditingStyle)editingStyle forRowAtIndexPath:(NSIndexPath *)indexPath {
-    Source *source = [self sourceAtIndexPath:indexPath];
-    [Sources_ removeObjectForKey:[source key]];
-    [delegate_ syncData];
+    if (editingStyle ==  UITableViewCellEditingStyleDelete) {
+        Source *source = [self sourceAtIndexPath:indexPath];
+        [Sources_ removeObjectForKey:[source key]];
+        [delegate_ syncData];
+    }
 }
 
 - (void) complete {