Use the correct handler

This commit is contained in:
topjohnwu 2020-08-27 04:17:21 -07:00
parent b4e8860ee4
commit fd808bd51e
2 changed files with 4 additions and 1 deletions

View File

@ -123,7 +123,7 @@ class CheckSafetyNetEvent(
titleRes = android.R.string.cancel
onClick { callback(SafetyNetResult(dismiss = true)) }
}
.onDismiss {
.onCancel {
callback(SafetyNetResult(dismiss = true))
}
.reveal()

View File

@ -254,6 +254,9 @@ class MagiskDialog(
)
}
fun onCancel(callback: OnDialogButtonClickListener) =
apply { setOnCancelListener(callback) }
fun onDismiss(callback: OnDialogButtonClickListener) =
apply { setOnDismissListener(callback) }