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

Commit 6c970d5

Browse files
committed
Merge pull request #92 from Microsoft/notify-during-sync
Call notifyApplicationReady during sync
2 parents f42ec59 + f8f7b14 commit 6c970d5

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

CodePush.js

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -219,8 +219,11 @@ function sync(options = {}, syncStatusChangeCallback, downloadProgressCallback)
219219
};
220220

221221
return new Promise((resolve, reject) => {
222-
syncStatusChangeCallback(CodePush.SyncStatus.CHECKING_FOR_UPDATE);
223-
checkForUpdate(syncOptions.deploymentKey)
222+
CodePush.notifyApplicationReady()
223+
.then(() => {
224+
syncStatusChangeCallback(CodePush.SyncStatus.CHECKING_FOR_UPDATE);
225+
return checkForUpdate(syncOptions.deploymentKey);
226+
})
224227
.then((remotePackage) => {
225228
var doDownloadAndInstall = () => {
226229
syncStatusChangeCallback(CodePush.SyncStatus.DOWNLOADING_PACKAGE);
@@ -333,4 +336,4 @@ var CodePush = {
333336
}
334337
};
335338

336-
module.exports = CodePush;
339+
module.exports = CodePush;

0 commit comments

Comments
 (0)