This repository was archived by the owner on May 20, 2025. It is now read-only.
File tree Expand file tree Collapse file tree 4 files changed +7
-11
lines changed
android/app/src/main/java/com/microsoft/codepush/react Expand file tree Collapse file tree 4 files changed +7
-11
lines changed Original file line number Diff line number Diff line change @@ -106,8 +106,8 @@ async function getCurrentPackage() {
106
106
async function getUpdateMetadata ( updateState ) {
107
107
const updateMetadata = await NativeCodePush . getUpdateMetadata ( updateState || CodePush . UpdateState . RUNNING ) ;
108
108
if ( updateMetadata ) {
109
- updateMetadata . failedInstall = await NativeCodePush . isFailedUpdate ( updateMetadata . packageHash ) ;
110
- updateMetadata . isFirstRun = await NativeCodePush . isFirstRun ( updateMetadata . packageHash ) ;
109
+ updateMetadata . failedInstall = await NativeCodePush . isFailedUpdate ( updateMetadata . packageHash ) ;
110
+ updateMetadata . isFirstRun = await NativeCodePush . isFirstRun ( updateMetadata . packageHash ) ;
111
111
}
112
112
return updateMetadata ;
113
113
}
Original file line number Diff line number Diff line change @@ -441,7 +441,7 @@ Example Usage:
441
441
```javascript
442
442
// Check if there is currently a CodePush update running, and if
443
443
// so, register it with the HockeyApp SDK (https: // github.com/slowpath/react-native-hockeyapp)
444
- // so that crash reports will correctly display the JS bundle version the user was running.
444
+ // so that crash reports will correctly display the JS bundle version the user was running.
445
445
codePush .getUpdateMetadata ().then ((update ) => {
446
446
if (update) {
447
447
hockeyApp .addMetadata ({ CodePushRelease: update .label });
Original file line number Diff line number Diff line change @@ -519,17 +519,15 @@ protected Void doInBackground(Void... params) {
519
519
// The current package satisfies the request:
520
520
// 1) Caller wanted a pending, and there is a pending update
521
521
// 2) Caller wanted the running update, and there isn't a pending
522
- // 3) Calers wants the latest update, regardless if it's pending or not
523
-
522
+ // 3) Caller wants the latest update, regardless if it's pending or not
524
523
if (isRunningBinaryVersion ) {
525
524
// This only matters in Debug builds. Since we do not clear "outdated" updates,
526
525
// we need to indicate to the JS side that somehow we have a current update on
527
526
// disk that is not actually running.
528
527
currentPackage .putBoolean ("_isDebugOnly" , true );
529
528
}
530
529
531
- // To support differentiating pending vs. non-pending updates
532
- // when request an update state of LATEST, provide an isPending flag
530
+ // Enable differentiating pending vs. non-pending updates
533
531
currentPackage .putBoolean ("isPending" , currentUpdateIsPending );
534
532
promise .resolve (currentPackage );
535
533
}
Original file line number Diff line number Diff line change @@ -569,17 +569,15 @@ - (void)applicationWillResignActive
569
569
// The current package satisfies the request:
570
570
// 1) Caller wanted a pending, and there is a pending update
571
571
// 2) Caller wanted the running update, and there isn't a pending
572
- // 3) Calers wants the latest update, regardless if it's pending or not
573
-
572
+ // 3) Caller wants the latest update, regardless if it's pending or not
574
573
if (isRunningBinaryVersion) {
575
574
// This only matters in Debug builds. Since we do not clear "outdated" updates,
576
575
// we need to indicate to the JS side that somehow we have a current update on
577
576
// disk that is not actually running.
578
577
[package setObject: @(YES ) forKey: @" _isDebugOnly" ];
579
578
}
580
579
581
- // To support differentiating pending vs. non-pending updates
582
- // when request an update state of LATEST, provide an isPending flag
580
+ // Enable differentiating pending vs. non-pending updates
583
581
[package setObject: @(currentUpdateIsPending) forKey: PackageIsPendingKey];
584
582
resolve (package);
585
583
}
You can’t perform that action at this time.
0 commit comments