Skip to content
This repository has been archived by the owner on Jan 16, 2021. It is now read-only.

Fix potential crash when calling UI code from background thread. #210

Merged
merged 1 commit into from
Nov 30, 2015
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@

#import "PFQueryTableViewController.h"

#import <Bolts/BFExecutor.h>
#import <Bolts/BFTask.h>
#import <Bolts/BFTaskCompletionSource.h>

Expand Down Expand Up @@ -397,8 +398,8 @@ - (void)removeObjectsAtIndexPaths:(NSArray *)indexPaths animated:(BOOL)animated
[allDeletionTasks addObject:[obj deleteInBackground]];
}

[[BFTask taskForCompletionOfAllTasks:allDeletionTasks]
continueWithBlock:deletionHandlerBlock];
[[BFTask taskForCompletionOfAllTasks:allDeletionTasks] continueWithExecutor:[BFExecutor mainThreadExecutor]
withBlock:deletionHandlerBlock];
}

- (PFTableViewCell *)tableView:(UITableView *)otherTableView cellForNextPageAtIndexPath:(NSIndexPath *)indexPath {
Expand Down