Commit 0b146579 authored by zhaopengxiang's avatar zhaopengxiang

简化code

parent 9309eada
......@@ -86,13 +86,13 @@ class ResetAuthorizePasswordActivity : BaseActivity() {
val accountAuthorizePassword = AccountPasswordManageKit.getInstance().accountPassword
if (TextUtils.isEmpty(accountAuthorizePassword)) {
AccountPasswordManageKit.getInstance()
.loadAccountPassword(this, AccountPasswordManageKit.AccountPasswordManageCallback {
.loadAccountPassword(this) {
if (!it.equals(originPassword)) {
CenterToasty.error(this, "原始密码输入错误!").show()
}else{
} else {
updateAuthorizePasswordSucced(newPassword)
}
})
}
} else {
if (!accountAuthorizePassword.equals(originPassword)) {
CenterToasty.error(this, "原始密码输入错误!").show()
......
......@@ -85,10 +85,10 @@ class AuthorizePasswordInputDialog() : DialogFragment(), View.OnClickListener {
val accountPassword = AccountPasswordManageKit.getInstance().accountPassword
if (TextUtils.isEmpty(accountPassword)) {
AccountPasswordManageKit.getInstance()
.loadAccountPassword(context as AppCompatActivity?,
AccountPasswordManageKit.AccountPasswordManageCallback {
.loadAccountPassword(context as AppCompatActivity?
) {
checkPasswordAndDoNext(it, inputPassword)
})
}
} else {
checkPasswordAndDoNext(accountPassword, inputPassword)
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment