show alert must happen in main thread (#1119)

//freebie
This commit is contained in:
Michael Kirk 2016-04-13 08:10:51 -07:00
parent 9d4befd08c
commit 7d8292fd53
1 changed files with 8 additions and 8 deletions

View File

@ -479,14 +479,14 @@
});
}
failure:^(NSError *error) {
UIAlertView *alert = [[UIAlertView alloc] initWithTitle:TIMEOUT
message:TIMEOUT_CONTACTS_DETAIL
delegate:nil
cancelButtonTitle:NSLocalizedString(@"OK", @"")
otherButtonTitles:nil];
[alert show];
dispatch_async(dispatch_get_main_queue(), ^{
[self updateAfterRefreshTry];
dispatch_async(dispatch_get_main_queue(), ^{
UIAlertView *alert = [[UIAlertView alloc] initWithTitle:TIMEOUT
message:TIMEOUT_CONTACTS_DETAIL
delegate:nil
cancelButtonTitle:NSLocalizedString(@"OK", @"")
otherButtonTitles:nil];
[alert show];
[self updateAfterRefreshTry];
});
}];