@@ -75,7 +75,7 @@ function createAlertDialogBuilder(options?: DialogOptions & MDCAlertControlerOpt
75
75
return builder ;
76
76
}
77
77
78
- function showDialog ( dlg : androidx . appcompat . app . AlertDialog , options : DialogOptions & MDCAlertControlerOptions , resolve ?: Function ) {
78
+ function showDialog ( dlg : androidx . appcompat . app . AlertDialog , options : DialogOptions & MDCAlertControlerOptions ) {
79
79
if ( options . titleColor ) {
80
80
const textViewId = dlg . getContext ( ) . getResources ( ) . getIdentifier ( 'android:id/alertTitle' , null , null ) ;
81
81
if ( textViewId ) {
@@ -262,9 +262,9 @@ export function alert(arg: any): Promise<void> {
262
262
263
263
const alert = createAlertDialogBuilder ( options ) ;
264
264
265
- const dlg = prepareAndCreateAlertDialog ( alert , options ) ;
265
+ const dlg = prepareAndCreateAlertDialog ( alert , options , resolve ) ;
266
266
267
- showDialog ( dlg , options , resolve ) ;
267
+ showDialog ( dlg , options ) ;
268
268
} catch ( ex ) {
269
269
console . error ( ex ) ;
270
270
reject ( ex ) ;
@@ -306,7 +306,7 @@ export function confirm(arg: any): Promise<boolean> {
306
306
: Object . assign ( defaultOptions , arg ) ;
307
307
const alert = createAlertDialogBuilder ( options ) ;
308
308
const dlg = prepareAndCreateAlertDialog ( alert , options , resolve ) ;
309
- showDialog ( dlg , options , resolve ) ;
309
+ showDialog ( dlg , options ) ;
310
310
} catch ( ex ) {
311
311
console . error ( ex ) ;
312
312
reject ( ex ) ;
@@ -396,7 +396,7 @@ export function prompt(arg: any): Promise<PromptResult> {
396
396
( r ) => ( { result : r , text : textField . text } )
397
397
) ;
398
398
399
- showDialog ( dlg , options , resolve ) ;
399
+ showDialog ( dlg , options ) ;
400
400
if ( ! ! options . autoFocus ) {
401
401
textField . requestFocus ( ) ;
402
402
}
@@ -477,7 +477,7 @@ export function login(arg: any): Promise<LoginResult> {
477
477
} ,
478
478
( r ) => ( { result : r , userName : userNameTextField . text , password : passwordTextField . text } )
479
479
) ;
480
- showDialog ( dlg , options , resolve ) ;
480
+ showDialog ( dlg , options ) ;
481
481
if ( ! ! options . autoFocus ) {
482
482
userNameTextField . requestFocus ( ) ;
483
483
}
@@ -551,7 +551,7 @@ export function action(arg: any): Promise<string> {
551
551
}
552
552
resolve ( r ) ;
553
553
} ) ;
554
- showDialog ( dlg , options , resolve ) ;
554
+ showDialog ( dlg , options ) ;
555
555
} catch ( ex ) {
556
556
console . error ( ex ) ;
557
557
reject ( ex ) ;
0 commit comments