This repository was archived by the owner on May 20, 2025. It is now read-only.
File tree Expand file tree Collapse file tree 2 files changed +20
-14
lines changed
android/app/src/main/java/com/microsoft/codepush/react Expand file tree Collapse file tree 2 files changed +20
-14
lines changed Original file line number Diff line number Diff line change @@ -113,13 +113,16 @@ public WritableMap getUpdateReport(WritableMap currentPackage) {
113
113
}
114
114
115
115
public void recordStatusReported (ReadableMap statusReport ) {
116
- if (statusReport .hasKey (STATUS_KEY ) && DEPLOYMENT_SUCCEEDED_STATUS .equals (statusReport .getString (STATUS_KEY ))) {
117
- if (statusReport .hasKey (APP_VERSION_KEY )) {
118
- saveStatusReportedForIdentifier (statusReport .getString (APP_VERSION_KEY ));
119
- } else if (statusReport .hasKey (PACKAGE_KEY )) {
120
- String packageIdentifier = getPackageStatusReportIdentifier (statusReport .getMap (PACKAGE_KEY ));
121
- saveStatusReportedForIdentifier (packageIdentifier );
122
- }
116
+ // We don't need to record rollback reports, so exit early if that's what was specified.
117
+ if (statusReport .hasKey (STATUS_KEY ) && DEPLOYMENT_FAILED_STATUS .equals (statusReport .getString (STATUS_KEY ))) {
118
+ return ;
119
+ }
120
+
121
+ if (statusReport .hasKey (APP_VERSION_KEY )) {
122
+ saveStatusReportedForIdentifier (statusReport .getString (APP_VERSION_KEY ));
123
+ } else if (statusReport .hasKey (PACKAGE_KEY )) {
124
+ String packageIdentifier = getPackageStatusReportIdentifier (statusReport .getMap (PACKAGE_KEY ));
125
+ saveStatusReportedForIdentifier (packageIdentifier );
123
126
}
124
127
}
125
128
Original file line number Diff line number Diff line change @@ -101,13 +101,16 @@ + (NSDictionary *)getUpdateReport:(NSDictionary *)currentPackage
101
101
102
102
+ (void )recordStatusReported : (NSDictionary *)statusReport
103
103
{
104
- if ([DeploymentSucceeded isEqualToString: statusReport[StatusKey]]) {
105
- if (statusReport[AppVersionKey]) {
106
- [self saveStatusReportedForIdentifier: statusReport[AppVersionKey]];
107
- } else if (statusReport[PackageKey]) {
108
- NSString *packageIdentifier = [self getPackageStatusReportIdentifier: statusReport[PackageKey]];
109
- [self saveStatusReportedForIdentifier: packageIdentifier];
110
- }
104
+ // We don't need to record rollback reports, so exit early if that's what was specified.
105
+ if ([DeploymentFailed isEqualToString: statusReport[StatusKey]]) {
106
+ return ;
107
+ }
108
+
109
+ if (statusReport[AppVersionKey]) {
110
+ [self saveStatusReportedForIdentifier: statusReport[AppVersionKey]];
111
+ } else if (statusReport[PackageKey]) {
112
+ NSString *packageIdentifier = [self getPackageStatusReportIdentifier: statusReport[PackageKey]];
113
+ [self saveStatusReportedForIdentifier: packageIdentifier];
111
114
}
112
115
}
113
116
You can’t perform that action at this time.
0 commit comments