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
@ -470,6 +471,7 @@ static NSString* const kBITAuthenticatorLastAuthenticatedVersionKey = @"BITAuthe
typeof(self) strongSelf = weakSelf;
[strongSelf applicationDidBecomeActive:note];
}];
}
}
- (void) unregisterObservers {