Skip to content

Commit

Permalink
Merge pull request soffes#86 from sascha/swipeToArchiveFix
Browse files Browse the repository at this point in the history
Disabling swipe-to-delete while adding a list or a task
  • Loading branch information
soffes committed Jan 13, 2013
2 parents a5352fb + be4e134 commit 7d35587
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
2 changes: 1 addition & 1 deletion Classes/CDIListsViewController.m
Original file line number Diff line number Diff line change
Expand Up @@ -435,7 +435,7 @@ - (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(N
}

- (BOOL)tableView:(UITableView *)tableView canEditRowAtIndexPath:(NSIndexPath *)indexPath {
if (_adding && indexPath.row == 0) {
if (_adding) {
return NO;
}

Expand Down
7 changes: 7 additions & 0 deletions Classes/CDITasksViewController.m
Original file line number Diff line number Diff line change
Expand Up @@ -373,6 +373,13 @@ - (UIView *)tableView:(UITableView *)tableView viewForHeaderInSection:(NSInteger
return self.addTaskView;
}

- (BOOL)tableView:(UITableView *)tableView canEditRowAtIndexPath:(NSIndexPath *)indexPath {
if (self.coverView.alpha == 1.0f) {
return NO;
}

return YES;
}

#pragma mark - UITableViewDelegate

Expand Down

0 comments on commit 7d35587

Please sign in to comment.