diff options
-rw-r--r-- | platform/ios/app/MBXOfflinePacksTableViewController.m | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/platform/ios/app/MBXOfflinePacksTableViewController.m b/platform/ios/app/MBXOfflinePacksTableViewController.m index 32e4bfea06..3410f075a1 100644 --- a/platform/ios/app/MBXOfflinePacksTableViewController.m +++ b/platform/ios/app/MBXOfflinePacksTableViewController.m @@ -164,12 +164,9 @@ static NSString * const MBXOfflinePacksTableViewActiveCellReuseIdentifier = @"Ac - (void)tableView:(UITableView *)tableView commitEditingStyle:(UITableViewCellEditingStyle)editingStyle forRowAtIndexPath:(NSIndexPath *)indexPath { if (editingStyle == UITableViewCellEditingStyleDelete) { MGLOfflinePack *pack = self.offlinePacks[indexPath.row]; - __weak MBXOfflinePacksTableViewController *weakSelf = self; - [[MGLOfflineStorage sharedOfflineStorage] removePack:pack withCompletionHandler:^(NSError *error) { - MBXOfflinePacksTableViewController *strongSelf = weakSelf; - [strongSelf.offlinePacks removeObjectAtIndex:indexPath.row]; - [strongSelf.tableView deleteRowsAtIndexPaths:@[indexPath] withRowAnimation:UITableViewRowAnimationAutomatic]; - }]; + [self.offlinePacks removeObjectAtIndex:indexPath.row]; + [self.tableView deleteRowsAtIndexPaths:@[indexPath] withRowAnimation:UITableViewRowAnimationAutomatic]; + [[MGLOfflineStorage sharedOfflineStorage] removePack:pack withCompletionHandler:nil]; } } |