summaryrefslogtreecommitdiffhomepage
path: root/android
diff options
context:
space:
mode:
authorJanito Vaqueiro Ferreira Filho <janito@mullvad.net>2020-04-04 01:40:42 +0000
committerJanito Vaqueiro Ferreira Filho <janito@mullvad.net>2020-04-27 16:21:52 +0000
commiteb47ab4cfb3a68c85da0a7c5fe43467300a8933a (patch)
treeb593fb829b8b43983791c70af8048f8a4513013c /android
parenteef498cd099f8c6b16b1143186a1037f7cbcdae1 (diff)
downloadmullvadvpn-eb47ab4cfb3a68c85da0a7c5fe43467300a8933a.tar.xz
mullvadvpn-eb47ab4cfb3a68c85da0a7c5fe43467300a8933a.zip
Don't update Manage Keys button with other buttons
Diffstat (limited to 'android')
-rw-r--r--android/src/main/kotlin/net/mullvad/mullvadvpn/ui/WireguardKeyFragment.kt8
1 files changed, 4 insertions, 4 deletions
diff --git a/android/src/main/kotlin/net/mullvad/mullvadvpn/ui/WireguardKeyFragment.kt b/android/src/main/kotlin/net/mullvad/mullvadvpn/ui/WireguardKeyFragment.kt
index e011a53d99..65f5daf018 100644
--- a/android/src/main/kotlin/net/mullvad/mullvadvpn/ui/WireguardKeyFragment.kt
+++ b/android/src/main/kotlin/net/mullvad/mullvadvpn/ui/WireguardKeyFragment.kt
@@ -44,7 +44,7 @@ class WireguardKeyFragment : ServiceDependentFragment(OnNoService.GoToLaunchScre
field = value
updateKeyInformation()
updateStatus()
- updateButtons()
+ updateActionButtons()
}
}
@@ -62,7 +62,8 @@ class WireguardKeyFragment : ServiceDependentFragment(OnNoService.GoToLaunchScre
if (field != value) {
field = value
updateStatus()
- updateButtons()
+ updateActionButtons()
+ manageKeysButton.setEnabled(value)
}
}
@@ -237,12 +238,11 @@ class WireguardKeyFragment : ServiceDependentFragment(OnNoService.GoToLaunchScre
}
}
- private fun updateButtons() {
+ private fun updateActionButtons() {
val isIdle = actionState is ActionState.Idle
generateKeyButton.setEnabled(isIdle && hasConnectivity)
verifyKeyButton.setEnabled(isIdle && hasConnectivity)
- manageKeysButton.setEnabled(hasConnectivity)
}
private fun setStatusMessage(message: Int, color: Int) {