mirror of
https://github.com/zhigang1992/react-native-code-push.git
synced 2026-06-20 03:48:44 +08:00
Fixing ordering
This commit is contained in:
11
CodePush.m
11
CodePush.m
@@ -9,9 +9,9 @@
|
||||
|
||||
RCT_EXPORT_MODULE()
|
||||
|
||||
BOOL didUpdate = NO;
|
||||
NSTimer *_timer;
|
||||
BOOL usingTestFolder = NO;
|
||||
BOOL didUpdate = NO;
|
||||
|
||||
NSString * const FailedUpdatesKey = @"CODE_PUSH_FAILED_UPDATES";
|
||||
NSString * const PendingUpdateKey = @"CODE_PUSH_PENDING_UPDATE";
|
||||
@@ -63,7 +63,8 @@ NSString * const PendingUpdateRollbackTimeoutKey = @"rollbackTimeout";
|
||||
});
|
||||
}
|
||||
|
||||
- (void)checkForPendingUpdate:(BOOL)isAppStart {
|
||||
- (void)checkForPendingUpdate:(BOOL)isAppStart
|
||||
{
|
||||
dispatch_async(dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_DEFAULT, 0), ^{
|
||||
NSUserDefaults *preferences = [NSUserDefaults standardUserDefaults];
|
||||
NSDictionary *pendingUpdate = [preferences objectForKey:PendingUpdateKey];
|
||||
@@ -98,7 +99,8 @@ NSString * const PendingUpdateRollbackTimeoutKey = @"rollbackTimeout";
|
||||
});
|
||||
}
|
||||
|
||||
- (void)checkForPendingUpdateDuringResume {
|
||||
- (void)checkForPendingUpdateDuringResume
|
||||
{
|
||||
[self checkForPendingUpdate:NO];
|
||||
}
|
||||
|
||||
@@ -112,7 +114,8 @@ NSString * const PendingUpdateRollbackTimeoutKey = @"rollbackTimeout";
|
||||
};
|
||||
};
|
||||
|
||||
- (void)dealloc {
|
||||
- (void)dealloc
|
||||
{
|
||||
[[NSNotificationCenter defaultCenter] removeObserver:self];
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user