From b52b310e8226c05a780aab74d1591bc6c1079885 Mon Sep 17 00:00:00 2001 From: Maarten Billemont Date: Sat, 4 Jun 2016 10:44:43 -0400 Subject: [PATCH] Fix saving of user after sign-in. --- MasterPassword/ObjC/iOS/MPUsersViewController.m | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/MasterPassword/ObjC/iOS/MPUsersViewController.m b/MasterPassword/ObjC/iOS/MPUsersViewController.m index e8464b8e..2190c7fb 100644 --- a/MasterPassword/ObjC/iOS/MPUsersViewController.m +++ b/MasterPassword/ObjC/iOS/MPUsersViewController.m @@ -369,16 +369,16 @@ referenceSizeForFooterInSection:(NSInteger)section { userAvatar.spinnerActive = YES; if (!isNew && mainUser && [MPiOSAppDelegate managedObjectContextPerformBlock:^(NSManagedObjectContext *context) { MPUserEntity *user = [MPUserEntity existingObjectWithID:mainUser.objectID inContext:context]; - BOOL signedIn = [[MPiOSAppDelegate get] signInAsUser:user saveInContext:mainContext usingMasterPassword:nil]; - - PearlMainQueue(^{ + BOOL signedIn = [[MPiOSAppDelegate get] signInAsUser:user saveInContext:context usingMasterPassword:nil]; + + PearlMainQueue( ^{ self.entryField.text = @""; self.entryField.enabled = YES; userAvatar.spinnerActive = NO; if (!signedIn) [self.entryField becomeFirstResponder]; - }); + } ); }]) return;