mirror of
https://github.com/Swiftgram/Telegram-iOS.git
synced 2025-08-02 00:17:02 +00:00
don't register twice
This commit is contained in:
parent
ebbe6dc0af
commit
e3dcfa629f
@ -462,6 +462,7 @@ static NSString* const kBITAuthenticatorLastAuthenticatedVersionKey = @"BITAuthe
|
|||||||
}
|
}
|
||||||
|
|
||||||
- (void) registerObservers {
|
- (void) registerObservers {
|
||||||
|
if(nil == _appDidBecomeActiveObserver) {
|
||||||
__weak typeof(self) weakSelf = self;
|
__weak typeof(self) weakSelf = self;
|
||||||
_appDidBecomeActiveObserver = [[NSNotificationCenter defaultCenter] addObserverForName:UIApplicationDidBecomeActiveNotification
|
_appDidBecomeActiveObserver = [[NSNotificationCenter defaultCenter] addObserverForName:UIApplicationDidBecomeActiveNotification
|
||||||
object:nil
|
object:nil
|
||||||
@ -470,6 +471,7 @@ static NSString* const kBITAuthenticatorLastAuthenticatedVersionKey = @"BITAuthe
|
|||||||
typeof(self) strongSelf = weakSelf;
|
typeof(self) strongSelf = weakSelf;
|
||||||
[strongSelf applicationDidBecomeActive:note];
|
[strongSelf applicationDidBecomeActive:note];
|
||||||
}];
|
}];
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
- (void) unregisterObservers {
|
- (void) unregisterObservers {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user