From 165e5238cf020a0967159ecc73cf6ca3b17f3a74 Mon Sep 17 00:00:00 2001 From: Matthew Chen Date: Fri, 17 Feb 2017 12:43:43 -0500 Subject: [PATCH] Simplify the prekey check on app launch and activation. // FREEBIE --- Signal/src/AppDelegate.m | 11 ++--------- 1 file changed, 2 insertions(+), 9 deletions(-) diff --git a/Signal/src/AppDelegate.m b/Signal/src/AppDelegate.m index 71030996a..060ba313a 100644 --- a/Signal/src/AppDelegate.m +++ b/Signal/src/AppDelegate.m @@ -291,15 +291,8 @@ static NSString *const kURLHostVerifyPrefix = @"verify"; [self removeScreenProtection]; - static BOOL hasCheckedPrekeys = NO; - if (!hasCheckedPrekeys) { - // Always check prekeys after app launches... - [TSPreKeyManager refreshPreKeys]; - hasCheckedPrekeys = YES; - } else { - // ...and sometimes check on app activation. - [TSPreKeyManager checkPreKeysIfNecessary]; - } + // Always check prekeys after app launches, and sometimes check on app activation. + [TSPreKeyManager checkPreKeysIfNecessary]; } - (void)applicationWillResignActive:(UIApplication *)application {