Skip to content

Commit 30c7bc9

Browse files
committed
remove: remove reportStatusDownload call
1 parent 9cc51be commit 30c7bc9

File tree

2 files changed

+2
-21
lines changed

2 files changed

+2
-21
lines changed

CodePush.js

+1-13
Original file line numberDiff line numberDiff line change
@@ -189,7 +189,7 @@ async function checkForUpdate(deploymentKey = null, handleBinaryVersionMismatchC
189189

190190
return null;
191191
} else {
192-
const remotePackage = { ...update, ...PackageMixins.remote(sdk.reportStatusDownload) };
192+
const remotePackage = { ...update, ...PackageMixins.remote() };
193193
remotePackage.failedInstall = await NativeCodePush.isFailedUpdate(remotePackage.packageHash);
194194
remotePackage.deploymentKey = deploymentKey || nativeConfig.deploymentKey;
195195
return remotePackage;
@@ -251,18 +251,6 @@ function getPromisifiedSdk(requestFetchAdapter, config) {
251251
});
252252
};
253253

254-
sdk.reportStatusDownload = (downloadedPackage) => {
255-
return new Promise((resolve, reject) => {
256-
module.exports.AcquisitionSdk.prototype.reportStatusDownload.call(sdk, downloadedPackage, (err) => {
257-
if (err) {
258-
reject(err);
259-
} else {
260-
resolve();
261-
}
262-
});
263-
});
264-
};
265-
266254
return sdk;
267255
}
268256

package-mixins.js

+1-8
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ import log from "./logging";
55
// package objects with additional functionality/properties
66
// beyond what is included in the metadata sent by the server.
77
module.exports = (NativeCodePush) => {
8-
const remote = (reportStatusDownload) => {
8+
const remote = () => {
99
return {
1010
async download(downloadProgressCallback) {
1111
if (!this.downloadUrl) {
@@ -30,13 +30,6 @@ module.exports = (NativeCodePush) => {
3030

3131
const downloadedPackage = await NativeCodePush.downloadUpdate(updatePackageCopy, !!downloadProgressCallback);
3232

33-
if (reportStatusDownload) {
34-
reportStatusDownload(this)
35-
.catch((err) => {
36-
log(`Report download status failed: ${err}`);
37-
});
38-
}
39-
4033
return { ...downloadedPackage, ...local };
4134
} finally {
4235
downloadProgressSubscription && downloadProgressSubscription.remove();

0 commit comments

Comments
 (0)