Change password: lambda

This commit is contained in:
Benoit Marty 2020-04-15 16:30:05 +02:00
parent d44e43d94b
commit 7bf1f916c4
1 changed files with 7 additions and 9 deletions

View File

@ -690,17 +690,15 @@ class VectorSettingsGeneralFragment : VectorSettingsBaseFragment() {
var passwordShown = false var passwordShown = false
showPassword.setOnClickListener(object : View.OnClickListener { showPassword.setOnClickListener {
override fun onClick(v: View?) { passwordShown = !passwordShown
passwordShown = !passwordShown
oldPasswordText.showPassword(passwordShown) oldPasswordText.showPassword(passwordShown)
newPasswordText.showPassword(passwordShown) newPasswordText.showPassword(passwordShown)
confirmNewPasswordText.showPassword(passwordShown) confirmNewPasswordText.showPassword(passwordShown)
showPassword.setImageResource(if (passwordShown) R.drawable.ic_eye_closed_black else R.drawable.ic_eye_black) showPassword.setImageResource(if (passwordShown) R.drawable.ic_eye_closed_black else R.drawable.ic_eye_black)
} }
})
val dialog = AlertDialog.Builder(activity) val dialog = AlertDialog.Builder(activity)
.setView(view) .setView(view)