Fix saving of user after sign-in.
This commit is contained in:
parent
6a74ada2fa
commit
b52b310e82
@ -369,16 +369,16 @@ referenceSizeForFooterInSection:(NSInteger)section {
|
|||||||
userAvatar.spinnerActive = YES;
|
userAvatar.spinnerActive = YES;
|
||||||
if (!isNew && mainUser && [MPiOSAppDelegate managedObjectContextPerformBlock:^(NSManagedObjectContext *context) {
|
if (!isNew && mainUser && [MPiOSAppDelegate managedObjectContextPerformBlock:^(NSManagedObjectContext *context) {
|
||||||
MPUserEntity *user = [MPUserEntity existingObjectWithID:mainUser.objectID inContext:context];
|
MPUserEntity *user = [MPUserEntity existingObjectWithID:mainUser.objectID inContext:context];
|
||||||
BOOL signedIn = [[MPiOSAppDelegate get] signInAsUser:user saveInContext:mainContext usingMasterPassword:nil];
|
BOOL signedIn = [[MPiOSAppDelegate get] signInAsUser:user saveInContext:context usingMasterPassword:nil];
|
||||||
|
|
||||||
PearlMainQueue(^{
|
PearlMainQueue( ^{
|
||||||
self.entryField.text = @"";
|
self.entryField.text = @"";
|
||||||
self.entryField.enabled = YES;
|
self.entryField.enabled = YES;
|
||||||
userAvatar.spinnerActive = NO;
|
userAvatar.spinnerActive = NO;
|
||||||
|
|
||||||
if (!signedIn)
|
if (!signedIn)
|
||||||
[self.entryField becomeFirstResponder];
|
[self.entryField becomeFirstResponder];
|
||||||
});
|
} );
|
||||||
}])
|
}])
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user