diff options
author | Harsh Shandilya <me@msfjarvis.dev> | 2021-02-07 12:49:00 +0530 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-02-07 12:49:00 +0530 |
commit | ea24056554f307f4f8f84b0ab6a808730d6acfa4 (patch) | |
tree | 46f043115a2e0631d2502d7450f0a806bddab3e4 /app/src/main/java | |
parent | 4b892c328da438024d0dea7e78d33cf48dc52561 (diff) |
Redo authentication modes UI with Chips (#1297)
Diffstat (limited to 'app/src/main/java')
-rw-r--r-- | app/src/main/java/dev/msfjarvis/aps/ui/git/config/GitServerConfigActivity.kt | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/app/src/main/java/dev/msfjarvis/aps/ui/git/config/GitServerConfigActivity.kt b/app/src/main/java/dev/msfjarvis/aps/ui/git/config/GitServerConfigActivity.kt index a964e150..0c250d87 100644 --- a/app/src/main/java/dev/msfjarvis/aps/ui/git/config/GitServerConfigActivity.kt +++ b/app/src/main/java/dev/msfjarvis/aps/ui/git/config/GitServerConfigActivity.kt @@ -63,8 +63,8 @@ class GitServerConfigActivity : BaseGitActivity() { AuthMode.OpenKeychain -> check(binding.authModeOpenKeychain.id) AuthMode.None -> check(View.NO_ID) } - addOnButtonCheckedListener { _, _, _ -> - when (checkedButtonId) { + setOnCheckedChangeListener { _, checkedId -> + when (checkedId) { binding.authModeSshKey.id -> newAuthMode = AuthMode.SshKey binding.authModeOpenKeychain.id -> newAuthMode = AuthMode.OpenKeychain binding.authModePassword.id -> newAuthMode = AuthMode.Password @@ -184,13 +184,13 @@ class GitServerConfigActivity : BaseGitActivity() { authModeSshKey.isVisible = false authModeOpenKeychain.isVisible = false authModePassword.isVisible = true - if (authModeGroup.checkedButtonId != authModePassword.id) + if (authModeGroup.checkedChipId != authModePassword.id) authModeGroup.check(View.NO_ID) } else { authModeSshKey.isVisible = true authModeOpenKeychain.isVisible = true authModePassword.isVisible = true - if (authModeGroup.checkedButtonId == View.NO_ID) + if (authModeGroup.checkedChipId == View.NO_ID) authModeGroup.check(authModeSshKey.id) } } |