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)
|
||||
.setMessage(message)
|
||||
.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)
|
||||
.show();
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue