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

Commit bfc5d1b

Browse files
committed
updateDialog
1 parent b34550a commit bfc5d1b

File tree

1 file changed

+8
-8
lines changed

1 file changed

+8
-8
lines changed

CodePush.ios.js

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -188,8 +188,8 @@ function sync(options = {}, onSyncStatusChange, onDownloadProgress) {
188188
onSyncStatusChange(CodePush.SyncStatus.IDLE);
189189
resolve(CodePush.SyncResult.UP_TO_DATE);
190190
}
191-
else if (syncOptions.updateNotification) {
192-
syncOptions.updateNotification = Object.assign(CodePush.DEFAULT_UPDATE_DIALOG, syncOptions.updateNotification);
191+
else if (syncOptions.updateDialog) {
192+
syncOptions.updateDialog = Object.assign(CodePush.DEFAULT_UPDATE_DIALOG, syncOptions.updateDialog);
193193

194194
var message = null;
195195
var dialogButtons = [
@@ -202,24 +202,24 @@ function sync(options = {}, onSyncStatusChange, onDownloadProgress) {
202202
];
203203

204204
if (remotePackage.isMandatory) {
205-
message = syncOptions.updateNotification.mandatoryUpdateMessage;
205+
message = syncOptions.updateDialog.mandatoryUpdateMessage;
206206
dialogButtons[0].text = syncOptions.mandatoryContinueButtonLabel;
207207
} else {
208-
message = syncOptions.updateNotification.optionalUpdateMessage;
209-
dialogButtons[0].text = syncOptions.updateNotification.optionalInstallButtonLabel;
208+
message = syncOptions.updateDialog.optionalUpdateMessage;
209+
dialogButtons[0].text = syncOptions.updateDialog.optionalInstallButtonLabel;
210210

211211
// Since this is an optional update, add another button
212212
// to allow the end-user to ignore it
213213
dialogButtons.push({
214-
text: syncOptions.updateNotification.optionalIgnoreButtonLabel,
214+
text: syncOptions.updateDialog.optionalIgnoreButtonLabel,
215215
onPress: () => resolve(CodePush.SyncResult.UPDATE_IGNORED)
216216
});
217217
}
218218

219219
// If the update has a description, and the developer
220220
// explicitly chose to display it, then set that as the message
221-
if (syncOptions.updateNotification.appendReleaseDescription && remotePackage.description) {
222-
message += `${syncOptions.updateNotification.descriptionPrefix} ${remotePackage.description}`;
221+
if (syncOptions.updateDialog.appendReleaseDescription && remotePackage.description) {
222+
message += `${syncOptions.updateDialog.descriptionPrefix} ${remotePackage.description}`;
223223
}
224224

225225
onSyncStatusChange(CodePush.SyncStatus.AWAITING_USER_ACTION);

0 commit comments

Comments
 (0)