mirror of
https://github.com/zhigang1992/react-native-code-push.git
synced 2026-06-10 15:49:36 +08:00
Merge pull request #92 from Microsoft/notify-during-sync
Call notifyApplicationReady during sync
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user