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
|
//disabled in the appStore
|
||||||
if([self isAppStoreEnvironment]) return;
|
if([self isAppStoreEnvironment]) return;
|
||||||
|
|
||||||
[self registerObservers];
|
|
||||||
|
|
||||||
switch ([[UIApplication sharedApplication] applicationState]) {
|
switch ([[UIApplication sharedApplication] applicationState]) {
|
||||||
case UIApplicationStateActive:
|
case UIApplicationStateActive:
|
||||||
[self triggerAuthentication];
|
[self triggerAuthentication];
|
||||||
@ -78,8 +76,11 @@ static NSString* const kBITAuthenticatorDidSkipOptionalLogin = @"BITAuthenticato
|
|||||||
// do nothing, wait for active state
|
// do nothing, wait for active state
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
[self registerObservers];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#pragma mark -
|
||||||
- (void) triggerAuthentication {
|
- (void) triggerAuthentication {
|
||||||
switch (self.validationType) {
|
switch (self.validationType) {
|
||||||
case BITAuthenticatorValidationTypeOnAppActive:
|
case BITAuthenticatorValidationTypeOnAppActive:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user