Skip to content

Commit 25e5336

Browse files
author
Vladimir Enchev
committed
OK button moved from first to last
1 parent bf8f5d8 commit 25e5336

1 file changed

Lines changed: 12 additions & 12 deletions

File tree

‎ui/dialogs/dialogs.ios.ts‎

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -62,17 +62,17 @@ function addButtonsToAlertDialog(alert: UIAlertView, options: dialogs.ConfirmOpt
6262
return;
6363
}
6464

65-
if (options.okButtonText) {
66-
alert.addButtonWithTitle(options.okButtonText);
67-
}
68-
6965
if (options.cancelButtonText) {
7066
alert.addButtonWithTitle(options.cancelButtonText);
7167
}
7268

7369
if (options.neutralButtonText) {
7470
alert.addButtonWithTitle(options.neutralButtonText);
7571
}
72+
73+
if (options.okButtonText) {
74+
alert.addButtonWithTitle(options.okButtonText);
75+
}
7676
}
7777

7878
function addButtonsToAlertController(alertController: UIAlertController, options: dialogs.ConfirmOptions,
@@ -81,14 +81,6 @@ function addButtonsToAlertController(alertController: UIAlertController, options
8181
return;
8282
}
8383

84-
if (types.isString(options.okButtonText)) {
85-
alertController.addAction(UIAlertAction.actionWithTitleStyleHandler(options.okButtonText, UIAlertActionStyle.UIAlertActionStyleDefault, (arg: UIAlertAction) => {
86-
if (types.isFunction(okCallback)) {
87-
okCallback();
88-
}
89-
}));
90-
}
91-
9284
if (types.isString(options.cancelButtonText)) {
9385
alertController.addAction(UIAlertAction.actionWithTitleStyleHandler(options.cancelButtonText, UIAlertActionStyle.UIAlertActionStyleDefault, (arg: UIAlertAction) => {
9486
if (types.isFunction(cancelCallback)) {
@@ -104,6 +96,14 @@ function addButtonsToAlertController(alertController: UIAlertController, options
10496
}
10597
}));
10698
}
99+
100+
if (types.isString(options.okButtonText)) {
101+
alertController.addAction(UIAlertAction.actionWithTitleStyleHandler(options.okButtonText, UIAlertActionStyle.UIAlertActionStyleDefault, (arg: UIAlertAction) => {
102+
if (types.isFunction(okCallback)) {
103+
okCallback();
104+
}
105+
}));
106+
}
107107
}
108108

109109
export function alert(arg: any): Promise<void> {

0 commit comments

Comments
 (0)