lets call the handleDeletePasswordProtection callback only at success
This commit is contained in:
parent
6bb16f10f1
commit
85d06c3742
2 changed files with 6 additions and 4 deletions
|
@ -7,7 +7,7 @@ buildscript {
|
|||
propMinSdkVersion = 21
|
||||
propTargetSdkVersion = propCompileSdkVersion
|
||||
propVersionCode = 1
|
||||
propVersionName = '5.2.17'
|
||||
propVersionName = '5.2.18'
|
||||
kotlin_version = '1.2.71'
|
||||
}
|
||||
|
||||
|
|
|
@ -740,13 +740,15 @@ fun Activity.handleAppPasswordProtection(callback: (success: Boolean) -> Unit) {
|
|||
}
|
||||
}
|
||||
|
||||
fun Activity.handleDeletePasswordProtection(callback: (success: Boolean) -> Unit) {
|
||||
fun Activity.handleDeletePasswordProtection(callback: () -> Unit) {
|
||||
if (baseConfig.isDeletePasswordProtectionOn) {
|
||||
SecurityDialog(this, baseConfig.deletePasswordHash, baseConfig.deleteProtectionType) { hash, type, success ->
|
||||
callback(success)
|
||||
if (success) {
|
||||
callback()
|
||||
}
|
||||
}
|
||||
} else {
|
||||
callback(true)
|
||||
callback()
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue