Skip to content
This repository was archived by the owner on May 20, 2025. It is now read-only.

Commit 5cc0556

Browse files
committed
add underscore prefix
1 parent 3b05073 commit 5cc0556

File tree

1 file changed

+13
-14
lines changed

1 file changed

+13
-14
lines changed

ios/CodePush/CodePush.m

Lines changed: 13 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -15,9 +15,9 @@ @implementation CodePush {
1515
BOOL _isFirstRunAfterUpdate;
1616
int _minimumBackgroundDuration;
1717
NSDate *_lastResignedDate;
18-
long long latestExpectedContentLength;
19-
long long latestReceivedConentLength;
20-
BOOL didUpdateProgress;
18+
long long _latestExpectedContentLength;
19+
long long _latestReceivedConentLength;
20+
BOOL _didUpdateProgress;
2121
}
2222

2323
RCT_EXPORT_MODULE()
@@ -174,7 +174,6 @@ + (void)setUsingTestConfiguration:(BOOL)shouldUseTestConfiguration
174174

175175
@synthesize bridge = _bridge;
176176
@synthesize methodQueue = _methodQueue;
177-
@synthesize pauseCallback = _pauseCallback;
178177
@synthesize paused = _paused;
179178

180179
/*
@@ -234,8 +233,8 @@ - (void)dispatchDownloadProgressEvent
234233
[self.bridge.eventDispatcher
235234
sendDeviceEventWithName:@"CodePushDownloadProgress"
236235
body:@{
237-
@"totalBytes":[NSNumber numberWithLongLong:latestExpectedContentLength],
238-
@"receivedBytes":[NSNumber numberWithLongLong:latestReceivedConentLength]
236+
@"totalBytes":[NSNumber numberWithLongLong:_latestExpectedContentLength],
237+
@"receivedBytes":[NSNumber numberWithLongLong:_latestReceivedConentLength]
239238
}];
240239
}
241240

@@ -509,7 +508,7 @@ - (void)applicationWillResignActive
509508
if (notifyProgress) {
510509
// Set up and unpause the frame observer so that it can emit
511510
// progress events every frame if the progress is updated.
512-
didUpdateProgress = NO;
511+
_didUpdateProgress = NO;
513512
_paused = NO;
514513
}
515514

@@ -520,14 +519,14 @@ - (void)applicationWillResignActive
520519
// The download is progressing forward
521520
progressCallback:^(long long expectedContentLength, long long receivedContentLength) {
522521
// 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;
526525

527526
// If the download is completed, stop observing frame
528527
// updates and synchronously send the last event.
529528
if (expectedContentLength == receivedContentLength) {
530-
didUpdateProgress = NO;
529+
_didUpdateProgress = NO;
531530
_paused = YES;
532531
[self dispatchDownloadProgressEvent];
533532
}
@@ -549,7 +548,7 @@ - (void)applicationWillResignActive
549548
}
550549

551550
// Stop observing frame updates if the download fails.
552-
didUpdateProgress = NO;
551+
_didUpdateProgress = NO;
553552
_paused = YES;
554553
reject([NSString stringWithFormat: @"%lu", (long)err.code], err.localizedDescription, err);
555554
}];
@@ -790,12 +789,12 @@ - (void)applicationWillResignActive
790789

791790
- (void)didUpdateFrame:(RCTFrameUpdate *)update
792791
{
793-
if (!didUpdateProgress) {
792+
if (!_didUpdateProgress) {
794793
return;
795794
}
796795

797796
[self dispatchDownloadProgressEvent];
798-
didUpdateProgress = NO;
797+
_didUpdateProgress = NO;
799798
}
800799

801800
@end

0 commit comments

Comments
 (0)