summaryrefslogtreecommitdiff
path: root/app/src/main/java
diff options
context:
space:
mode:
authorHarsh Shandilya <me@msfjarvis.dev>2021-02-07 12:49:00 +0530
committerGitHub <noreply@github.com>2021-02-07 12:49:00 +0530
commitea24056554f307f4f8f84b0ab6a808730d6acfa4 (patch)
tree46f043115a2e0631d2502d7450f0a806bddab3e4 /app/src/main/java
parent4b892c328da438024d0dea7e78d33cf48dc52561 (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.kt8
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)
}
}