fix: fix crash when onDenied runnable is null on dialogs
This commit is contained in:
parent
4e21b60087
commit
72fdff96c8
1 changed files with 4 additions and 1 deletions
|
@ -400,7 +400,10 @@ public class UiUtils {
|
||||||
.setTitle(title)
|
.setTitle(title)
|
||||||
.setMessage(message)
|
.setMessage(message)
|
||||||
.setPositiveButton(confirmButton, (dlg, i)->onConfirmed.run())
|
.setPositiveButton(confirmButton, (dlg, i)->onConfirmed.run())
|
||||||
.setNegativeButton(R.string.cancel, (dialog, which) -> onDenied.run())
|
.setNegativeButton(R.string.cancel, (dialog, which) -> {
|
||||||
|
if (onDenied != null)
|
||||||
|
onDenied.run();
|
||||||
|
})
|
||||||
.setIcon(icon)
|
.setIcon(icon)
|
||||||
.show();
|
.show();
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue