From ab3aa9d0ce966ab10f0c0a0d02b3e3b4bba8a722 Mon Sep 17 00:00:00 2001 From: Matthew Chen Date: Wed, 5 Jul 2017 18:12:06 -0400 Subject: [PATCH] Respond to CR. // FREEBIE --- Signal/src/AppDelegate.m | 30 +++++++++++++----------------- 1 file changed, 13 insertions(+), 17 deletions(-) diff --git a/Signal/src/AppDelegate.m b/Signal/src/AppDelegate.m index e3d2c3c87..1d00b4710 100644 --- a/Signal/src/AppDelegate.m +++ b/Signal/src/AppDelegate.m @@ -436,23 +436,6 @@ static NSString *const kURLHostVerifyPrefix = @"verify"; if (getenv("runningTests_dontStartApp")) { return; } - - [[TSAccountManager sharedInstance] ifRegistered:YES - runAsync:^{ - // We're double checking that the app is active, to be sure since we - // can't verify in production env due to code - // signing. - [TSSocketManager requestSocketOpen]; - - dispatch_async(dispatch_get_main_queue(), ^{ - [[Environment getCurrent] - .contactsManager fetchSystemContactsIfAlreadyAuthorized]; - }); - - // This will fetch new messages, if we're using domain - // fronting. - [[PushManager sharedManager] applicationDidBecomeActive]; - }]; [self removeScreenProtection]; @@ -499,6 +482,7 @@ static NSString *const kURLHostVerifyPrefix = @"verify"; runAsync:^{ dispatch_async(dispatch_get_main_queue(), ^{ DDLogInfo(@"%@ running post launch block for unregistered user.", self.tag); + [TSSocketManager requestSocketOpen]; UITapGestureRecognizer *gesture = @@ -511,6 +495,18 @@ static NSString *const kURLHostVerifyPrefix = @"verify"; }]; }); + [[TSAccountManager sharedInstance] + ifRegistered:YES + runAsync:^{ + dispatch_async(dispatch_get_main_queue(), ^{ + [[Environment getCurrent].contactsManager fetchSystemContactsIfAlreadyAuthorized]; + }); + + // This will fetch new messages, if we're using domain + // fronting. + [[PushManager sharedManager] applicationDidBecomeActive]; + }]; + DDLogInfo(@"%@ applicationDidBecomeActive completed.", self.tag); }