@@ -15,9 +15,9 @@ @implementation CodePush {
15
15
BOOL _isFirstRunAfterUpdate;
16
16
int _minimumBackgroundDuration;
17
17
NSDate *_lastResignedDate;
18
- long long latestExpectedContentLength ;
19
- long long latestReceivedConentLength ;
20
- BOOL didUpdateProgress ;
18
+ long long _latestExpectedContentLength ;
19
+ long long _latestReceivedConentLength ;
20
+ BOOL _didUpdateProgress ;
21
21
}
22
22
23
23
RCT_EXPORT_MODULE ()
@@ -174,7 +174,6 @@ + (void)setUsingTestConfiguration:(BOOL)shouldUseTestConfiguration
174
174
175
175
@synthesize bridge = _bridge;
176
176
@synthesize methodQueue = _methodQueue;
177
- @synthesize pauseCallback = _pauseCallback;
178
177
@synthesize paused = _paused;
179
178
180
179
/*
@@ -234,8 +233,8 @@ - (void)dispatchDownloadProgressEvent
234
233
[self .bridge.eventDispatcher
235
234
sendDeviceEventWithName: @" CodePushDownloadProgress"
236
235
body: @{
237
- @" totalBytes" :[NSNumber numberWithLongLong: latestExpectedContentLength ],
238
- @" receivedBytes" :[NSNumber numberWithLongLong: latestReceivedConentLength ]
236
+ @" totalBytes" :[NSNumber numberWithLongLong: _latestExpectedContentLength ],
237
+ @" receivedBytes" :[NSNumber numberWithLongLong: _latestReceivedConentLength ]
239
238
}];
240
239
}
241
240
@@ -509,7 +508,7 @@ - (void)applicationWillResignActive
509
508
if (notifyProgress) {
510
509
// Set up and unpause the frame observer so that it can emit
511
510
// progress events every frame if the progress is updated.
512
- didUpdateProgress = NO ;
511
+ _didUpdateProgress = NO ;
513
512
_paused = NO ;
514
513
}
515
514
@@ -520,14 +519,14 @@ - (void)applicationWillResignActive
520
519
// The download is progressing forward
521
520
progressCallback: ^(long long expectedContentLength, long long receivedContentLength) {
522
521
// Update the download progress so that the frame observer can notify the JS side
523
- latestExpectedContentLength = expectedContentLength;
524
- latestReceivedConentLength = receivedContentLength;
525
- didUpdateProgress = YES ;
522
+ _latestExpectedContentLength = expectedContentLength;
523
+ _latestReceivedConentLength = receivedContentLength;
524
+ _didUpdateProgress = YES ;
526
525
527
526
// If the download is completed, stop observing frame
528
527
// updates and synchronously send the last event.
529
528
if (expectedContentLength == receivedContentLength) {
530
- didUpdateProgress = NO ;
529
+ _didUpdateProgress = NO ;
531
530
_paused = YES ;
532
531
[self dispatchDownloadProgressEvent ];
533
532
}
@@ -549,7 +548,7 @@ - (void)applicationWillResignActive
549
548
}
550
549
551
550
// Stop observing frame updates if the download fails.
552
- didUpdateProgress = NO ;
551
+ _didUpdateProgress = NO ;
553
552
_paused = YES ;
554
553
reject ([NSString stringWithFormat: @" %lu " , (long )err.code], err.localizedDescription , err);
555
554
}];
@@ -790,12 +789,12 @@ - (void)applicationWillResignActive
790
789
791
790
- (void )didUpdateFrame : (RCTFrameUpdate *)update
792
791
{
793
- if (!didUpdateProgress ) {
792
+ if (!_didUpdateProgress ) {
794
793
return ;
795
794
}
796
795
797
796
[self dispatchDownloadProgressEvent ];
798
- didUpdateProgress = NO ;
797
+ _didUpdateProgress = NO ;
799
798
}
800
799
801
800
@end
0 commit comments