@@ -10,6 +10,7 @@ var NativeCodePush = require('react-native').NativeModules.CodePush;
10
10
var requestFetchAdapter = require ( "./request-fetch-adapter.js" ) ;
11
11
var Sdk = require ( "code-push/script/acquisition-sdk" ) . AcquisitionManager ;
12
12
var packageMixins = require ( "./package-mixins" ) ( NativeCodePush ) ;
13
+ var { AlertIOS } = require ( "react-native" ) ;
13
14
14
15
// This function is only used for tests. Replaces the default SDK, configuration and native bridge
15
16
function setUpTestDependencies ( providedTestSdk , providedTestConfig , testNativeBridge ) {
@@ -105,7 +106,7 @@ function sync(options = {}) {
105
106
else {
106
107
var dialogButtons = [
107
108
{
108
- text : options . downloadButtonText || "Download " ,
109
+ text : options . updateButtonText || "Update " ,
109
110
onPress : ( ) => {
110
111
remotePackage . download ( )
111
112
. then ( ( localPackage ) => {
@@ -118,12 +119,12 @@ function sync(options = {}) {
118
119
119
120
if ( ! remotePackage . isMandatory ) {
120
121
dialogButtons . push ( {
121
- text : options . cancelButtonText || "Cancel " ,
122
+ text : options . cancelButtonText || "Ignore " ,
122
123
onPress : ( ) => resolve ( CodePush . SyncStatus . USER_CANCELLED )
123
124
} ) ;
124
125
}
125
126
126
- React . AlertIOS . alert ( options . title || "Update available" , remotePackage . description , dialogButtons ) ;
127
+ AlertIOS . alert ( options . title || "Update available" , remotePackage . description , dialogButtons ) ;
127
128
}
128
129
} , reject ) ;
129
130
} ) ;
@@ -138,8 +139,8 @@ var CodePush = {
138
139
sync : sync ,
139
140
SyncStatus : {
140
141
NO_UPDATE_AVAILABLE : 0 ,
141
- APPLY_SUCCESS : 1 ,
142
- USER_CANCELLED : 2
142
+ USER_CANCELLED : 1 ,
143
+ APPLY_SUCCESS : 2
143
144
}
144
145
} ;
145
146
0 commit comments