mirror of
https://github.com/Swiftgram/Telegram-iOS.git
synced 2025-12-05 14:02:48 +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,16 +240,24 @@
|
|||||||
#endif /* HOCKEYSDK_FEATURE_AUTHENTICATOR */
|
#endif /* HOCKEYSDK_FEATURE_AUTHENTICATOR */
|
||||||
|
|
||||||
#if HOCKEYSDK_FEATURE_UPDATES
|
#if HOCKEYSDK_FEATURE_UPDATES
|
||||||
// Setup UpdateManager
|
BOOL jmcIsPresent = NO;
|
||||||
if (![self isUpdateManagerDisabled]
|
BOOL isIdentified = NO;
|
||||||
|
|
||||||
#if HOCKEYSDK_FEATURE_JIRA_MOBILE_CONNECT
|
#if HOCKEYSDK_FEATURE_JIRA_MOBILE_CONNECT
|
||||||
|| [[self class] isJMCPresent]
|
jmcIsPresent = [[self class] isJMCPresent]
|
||||||
#endif /* HOCKEYSDK_FEATURE_JIRA_MOBILE_CONNECT */
|
#endif /* HOCKEYSDK_FEATURE_JIRA_MOBILE_CONNECT */
|
||||||
) {
|
|
||||||
if ([self.authenticator isIdentified]) {
|
#if HOCKEYSDK_FEATURE_AUTHENTICATOR
|
||||||
|
if (![self isAppStoreEnvironment])
|
||||||
|
isIdentified = [self.authenticator isIdentified];
|
||||||
|
#endif /* HOCKEYSDK_FEATURE_AUTHENTICATOR */
|
||||||
|
|
||||||
|
// Setup UpdateManager
|
||||||
|
if (
|
||||||
|
(![self isUpdateManagerDisabled] && isIdentified) ||
|
||||||
|
jmcIsPresent) {
|
||||||
[self invokeStartUpdateManager];
|
[self invokeStartUpdateManager];
|
||||||
}
|
}
|
||||||
}
|
|
||||||
#endif /* HOCKEYSDK_FEATURE_UPDATES */
|
#endif /* HOCKEYSDK_FEATURE_UPDATES */
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -307,13 +315,9 @@
|
|||||||
[object valueForKey:@"isIdentified"] ) {
|
[object valueForKey:@"isIdentified"] ) {
|
||||||
if (![self isAppStoreEnvironment]) {
|
if (![self isAppStoreEnvironment]) {
|
||||||
BOOL identified = [(NSNumber *)[object valueForKey:@"isIdentified"] boolValue];
|
BOOL identified = [(NSNumber *)[object valueForKey:@"isIdentified"] boolValue];
|
||||||
if (identified) {
|
if (identified && ![self isUpdateManagerDisabled]) {
|
||||||
#if HOCKEYSDK_FEATURE_UPDATES
|
|
||||||
if (![self isUpdateManagerDisabled]) {
|
|
||||||
[self invokeStartUpdateManager];
|
[self invokeStartUpdateManager];
|
||||||
}
|
}
|
||||||
#endif
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
#if HOCKEYSDK_FEATURE_JIRA_MOBILE_CONNECT
|
#if HOCKEYSDK_FEATURE_JIRA_MOBILE_CONNECT
|
||||||
} else if (([object trackerConfig]) && ([[object trackerConfig] isKindOfClass:[NSDictionary class]])) {
|
} else if (([object trackerConfig]) && ([[object trackerConfig] isKindOfClass:[NSDictionary class]])) {
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user