Move a few batches of UI work into the main thread.
This commit is contained in:
parent
fa588f8fe2
commit
1977a423a5
@ -91,6 +91,7 @@ typedef NS_OPTIONS( NSUInteger, MPPasswordsTips ) {
|
||||
[MPiOSAppDelegate managedObjectContextPerformBlock:^(NSManagedObjectContext *context) {
|
||||
MPUserEntity *activeUser = [[MPiOSAppDelegate get] activeUserInContext:context];
|
||||
if (![MPAlgorithmDefault tryMigrateUser:activeUser inContext:context])
|
||||
PearlMainQueue(^{
|
||||
[self performSegueWithIdentifier:@"message" sender:
|
||||
[MPMessage messageWithTitle:@"You have sites that can be upgraded." text:
|
||||
@"Upgrading a site allows it to take advantage of the latest improvements in the Master Password algorithm.\n\n"
|
||||
@ -98,6 +99,7 @@ typedef NS_OPTIONS( NSUInteger, MPPasswordsTips ) {
|
||||
"You can then update your site's account with the new and stronger password.\n\n"
|
||||
"The upgrade button can be found in the site's settings and looks like this:"
|
||||
info:YES]];
|
||||
});
|
||||
[context saveToStore];
|
||||
}];
|
||||
}
|
||||
@ -417,6 +419,7 @@ typedef NS_OPTIONS( NSUInteger, MPPasswordsTips ) {
|
||||
if (![self.fetchedResultsController performFetch:&error])
|
||||
err( @"Couldn't fetch sites: %@", [error fullDescription] );
|
||||
|
||||
PearlMainQueue(^{
|
||||
@try {
|
||||
[self.passwordCollectionView performBatchUpdates:^{
|
||||
[self fetchedItemsDidUpdate];
|
||||
@ -447,6 +450,7 @@ typedef NS_OPTIONS( NSUInteger, MPPasswordsTips ) {
|
||||
wrn( @"While updating password cells: %@", [exception fullDescription] );
|
||||
[self.passwordCollectionView reloadData];
|
||||
}
|
||||
});
|
||||
}];
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user