Merge pull request #92 from Microsoft/notify-during-sync

Call notifyApplicationReady during sync
This commit is contained in:
Geoffrey Goh
2015-12-05 11:12:08 -08:00

View File

@@ -219,8 +219,11 @@ function sync(options = {}, syncStatusChangeCallback, downloadProgressCallback)
};
return new Promise((resolve, reject) => {
syncStatusChangeCallback(CodePush.SyncStatus.CHECKING_FOR_UPDATE);
checkForUpdate(syncOptions.deploymentKey)
CodePush.notifyApplicationReady()
.then(() => {
syncStatusChangeCallback(CodePush.SyncStatus.CHECKING_FOR_UPDATE);
return checkForUpdate(syncOptions.deploymentKey);
})
.then((remotePackage) => {
var doDownloadAndInstall = () => {
syncStatusChangeCallback(CodePush.SyncStatus.DOWNLOADING_PACKAGE);
@@ -333,4 +336,4 @@ var CodePush = {
}
};
module.exports = CodePush;
module.exports = CodePush;