Simplify the prekey check on app launch and activation.

// FREEBIE
This commit is contained in:
Matthew Chen 2017-02-17 12:43:43 -05:00
parent c2061cda90
commit 165e5238cf
1 changed files with 2 additions and 9 deletions

View File

@ -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 {