make dialog nullable at receiving hash

This commit is contained in:
tibbi 2020-10-24 10:07:47 +02:00
parent b6724f8da2
commit b2c360e893
2 changed files with 7 additions and 7 deletions

View file

@ -6,7 +6,7 @@ buildscript {
propMinSdkVersion = 21
propTargetSdkVersion = propCompileSdkVersion
propVersionCode = 1
propVersionName = '5.31.6'
propVersionName = '5.31.7'
kotlin_version = '1.4.10'
}

View file

@ -59,11 +59,11 @@ class SecurityDialog(val activity: Activity, val requiredHash: String, val showT
}
dialog = AlertDialog.Builder(activity)
.setOnCancelListener { onCancelFail() }
.setNegativeButton(R.string.cancel) { dialog, which -> onCancelFail() }
.create().apply {
activity.setupDialogStuff(view, this)
}
.setOnCancelListener { onCancelFail() }
.setNegativeButton(R.string.cancel) { dialog, which -> onCancelFail() }
.create().apply {
activity.setupDialogStuff(view, this)
}
}
private fun onCancelFail() {
@ -73,7 +73,7 @@ class SecurityDialog(val activity: Activity, val requiredHash: String, val showT
override fun receivedHash(hash: String, type: Int) {
callback(hash, type, true)
dialog!!.dismiss()
dialog?.dismiss()
}
private fun updateTabVisibility() {