mirror of
https://github.com/Swiftgram/Telegram-iOS.git
synced 2025-12-04 21:41:45 +00:00
Properly check for identification before calling BITUpdateManager startManager only if the user is identified or JMC is setup
Also fixes a problem when Authenticator was excluded but UpdateManager was included.
This commit is contained in:
parent
2788b749d8
commit
5f87227e76
@ -240,15 +240,23 @@
|
||||
#endif /* HOCKEYSDK_FEATURE_AUTHENTICATOR */
|
||||
|
||||
#if HOCKEYSDK_FEATURE_UPDATES
|
||||
// Setup UpdateManager
|
||||
if (![self isUpdateManagerDisabled]
|
||||
BOOL jmcIsPresent = NO;
|
||||
BOOL isIdentified = NO;
|
||||
|
||||
#if HOCKEYSDK_FEATURE_JIRA_MOBILE_CONNECT
|
||||
|| [[self class] isJMCPresent]
|
||||
jmcIsPresent = [[self class] isJMCPresent]
|
||||
#endif /* HOCKEYSDK_FEATURE_JIRA_MOBILE_CONNECT */
|
||||
) {
|
||||
if ([self.authenticator isIdentified]) {
|
||||
[self invokeStartUpdateManager];
|
||||
}
|
||||
|
||||
#if HOCKEYSDK_FEATURE_AUTHENTICATOR
|
||||
if (![self isAppStoreEnvironment])
|
||||
isIdentified = [self.authenticator isIdentified];
|
||||
#endif /* HOCKEYSDK_FEATURE_AUTHENTICATOR */
|
||||
|
||||
// Setup UpdateManager
|
||||
if (
|
||||
(![self isUpdateManagerDisabled] && isIdentified) ||
|
||||
jmcIsPresent) {
|
||||
[self invokeStartUpdateManager];
|
||||
}
|
||||
#endif /* HOCKEYSDK_FEATURE_UPDATES */
|
||||
}
|
||||
@ -307,12 +315,8 @@
|
||||
[object valueForKey:@"isIdentified"] ) {
|
||||
if (![self isAppStoreEnvironment]) {
|
||||
BOOL identified = [(NSNumber *)[object valueForKey:@"isIdentified"] boolValue];
|
||||
if (identified) {
|
||||
#if HOCKEYSDK_FEATURE_UPDATES
|
||||
if (![self isUpdateManagerDisabled]) {
|
||||
[self invokeStartUpdateManager];
|
||||
}
|
||||
#endif
|
||||
if (identified && ![self isUpdateManagerDisabled]) {
|
||||
[self invokeStartUpdateManager];
|
||||
}
|
||||
}
|
||||
#if HOCKEYSDK_FEATURE_JIRA_MOBILE_CONNECT
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user