don't register twice

This commit is contained in:
Stephan Diederich 2013-09-10 17:06:00 +02:00
parent ebbe6dc0af
commit e3dcfa629f

View File

@ -462,6 +462,7 @@ static NSString* const kBITAuthenticatorLastAuthenticatedVersionKey = @"BITAuthe
}
- (void) registerObservers {
if(nil == _appDidBecomeActiveObserver) {
__weak typeof(self) weakSelf = self;
_appDidBecomeActiveObserver = [[NSNotificationCenter defaultCenter] addObserverForName:UIApplicationDidBecomeActiveNotification
object:nil
@ -471,6 +472,7 @@ static NSString* const kBITAuthenticatorLastAuthenticatedVersionKey = @"BITAuthe
[strongSelf applicationDidBecomeActive:note];
}];
}
}
- (void) unregisterObservers {
if(_appDidBecomeActiveObserver) {