change the AppSideloadedDialogs callback from dismiss to cancel listener

This commit is contained in:
tibbi 2020-03-03 23:09:33 +01:00
parent 4ae7849ff5
commit 6089ebc87a

View file

@ -24,7 +24,7 @@ class AppSideloadedDialog(val activity: Activity, val callback: () -> Unit) {
dialog = AlertDialog.Builder(activity)
.setNegativeButton(R.string.cancel) { dialog, which -> negativePressed() }
.setPositiveButton(R.string.download, null)
.setOnDismissListener { negativePressed() }
.setOnCancelListener { negativePressed() }
.create().apply {
activity.setupDialogStuff(view, this)
getButton(AlertDialog.BUTTON_POSITIVE).setOnClickListener {