Skip to content

Commit 51c4b10

Browse files
authored
fix(android): allow CSS styling of neutral button in dialogs (#10745)
1 parent ac2e6a0 commit 51c4b10

File tree

1 file changed

+11
-11
lines changed

1 file changed

+11
-11
lines changed

packages/core/ui/dialogs/index.android.ts

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ function showDialog(builder: android.app.AlertDialog.Builder) {
4848

4949
if (color) {
5050
const buttons: android.widget.Button[] = [];
51-
for (let i = 0; i < 3; i++) {
51+
for (let i = 0; i < 4; i++) {
5252
const id = dlg
5353
.getContext()
5454
.getResources()
@@ -82,7 +82,7 @@ function addButtonsToAlertDialog(alert: android.app.AlertDialog.Builder, options
8282
dialog.cancel();
8383
callback(true);
8484
},
85-
})
85+
}),
8686
);
8787
}
8888

@@ -94,7 +94,7 @@ function addButtonsToAlertDialog(alert: android.app.AlertDialog.Builder, options
9494
dialog.cancel();
9595
callback(false);
9696
},
97-
})
97+
}),
9898
);
9999
}
100100

@@ -106,15 +106,15 @@ function addButtonsToAlertDialog(alert: android.app.AlertDialog.Builder, options
106106
dialog.cancel();
107107
callback(undefined);
108108
},
109-
})
109+
}),
110110
);
111111
}
112112
alert.setOnDismissListener(
113113
new android.content.DialogInterface.OnDismissListener({
114114
onDismiss: function () {
115115
callback(false);
116116
},
117-
})
117+
}),
118118
);
119119
}
120120

@@ -132,14 +132,14 @@ export function alert(arg: any): Promise<void> {
132132
dialog.cancel();
133133
resolve();
134134
},
135-
})
135+
}),
136136
);
137137
alert.setOnDismissListener(
138138
new android.content.DialogInterface.OnDismissListener({
139139
onDismiss: function () {
140140
resolve();
141141
},
142-
})
142+
}),
143143
);
144144

145145
showDialog(alert);
@@ -158,7 +158,7 @@ export function confirm(arg: any): Promise<boolean> {
158158
okButtonText: DialogStrings.OK,
159159
cancelButtonText: DialogStrings.CANCEL,
160160
message: arg + '',
161-
}
161+
}
162162
: arg;
163163
const alert = createAlertDialog(options);
164164

@@ -345,7 +345,7 @@ export function action(...args): Promise<string> {
345345
onClick: function (dialog: android.content.DialogInterface, which: number) {
346346
resolve(options.actions[which]);
347347
},
348-
})
348+
}),
349349
);
350350
}
351351

@@ -357,7 +357,7 @@ export function action(...args): Promise<string> {
357357
dialog.cancel();
358358
resolve(options.cancelButtonText);
359359
},
360-
})
360+
}),
361361
);
362362
}
363363

@@ -370,7 +370,7 @@ export function action(...args): Promise<string> {
370370
resolve('');
371371
}
372372
},
373-
})
373+
}),
374374
);
375375

376376
showDialog(alert);

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy