mirror of
https://github.com/zhigang1992/react-native-code-push.git
synced 2026-05-19 19:39:54 +08:00
rename var
This commit is contained in:
@@ -7,7 +7,7 @@
|
||||
#import "CodePush.h"
|
||||
|
||||
@implementation CodePush {
|
||||
BOOL hasRestartListener;
|
||||
BOOL _hasResumeListener;
|
||||
}
|
||||
|
||||
RCT_EXPORT_MODULE()
|
||||
@@ -338,14 +338,14 @@ RCT_EXPORT_METHOD(installUpdate:(NSDictionary*)updatePackage
|
||||
[self loadBundle];
|
||||
} else if (installMode == CodePushInstallModeOnNextResume) {
|
||||
// Ensure we do not add the listener twice.
|
||||
if (!hasRestartListener) {
|
||||
if (!_hasResumeListener) {
|
||||
// Register for app resume notifications so that we
|
||||
// can check for pending updates which support "restart on resume"
|
||||
[[NSNotificationCenter defaultCenter] addObserver:self
|
||||
selector:@selector(loadBundle)
|
||||
name:UIApplicationWillEnterForegroundNotification
|
||||
object:[UIApplication sharedApplication]];
|
||||
hasRestartListener = true;
|
||||
_hasResumeListener = true;
|
||||
}
|
||||
}
|
||||
// Signal to JS that the update has been applied.
|
||||
|
||||
Reference in New Issue
Block a user