mirror of
https://github.com/Swiftgram/Telegram-iOS.git
synced 2025-08-08 08:31:13 +00:00
cleanup
first authenticate depending on app state, then register for appState changes.
This commit is contained in:
parent
14d4ccaddf
commit
9243d012b9
@ -67,8 +67,6 @@ static NSString* const kBITAuthenticatorDidSkipOptionalLogin = @"BITAuthenticato
|
||||
//disabled in the appStore
|
||||
if([self isAppStoreEnvironment]) return;
|
||||
|
||||
[self registerObservers];
|
||||
|
||||
switch ([[UIApplication sharedApplication] applicationState]) {
|
||||
case UIApplicationStateActive:
|
||||
[self triggerAuthentication];
|
||||
@ -78,8 +76,11 @@ static NSString* const kBITAuthenticatorDidSkipOptionalLogin = @"BITAuthenticato
|
||||
// do nothing, wait for active state
|
||||
break;
|
||||
}
|
||||
|
||||
[self registerObservers];
|
||||
}
|
||||
|
||||
#pragma mark -
|
||||
- (void) triggerAuthentication {
|
||||
switch (self.validationType) {
|
||||
case BITAuthenticatorValidationTypeOnAppActive:
|
||||
|
Loading…
x
Reference in New Issue
Block a user