summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-rw-r--r--android/src/main/kotlin/net/mullvad/mullvadvpn/ui/WireguardKeyFragment.kt15
1 files changed, 14 insertions, 1 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 bd74c2c8c5..8ea1f94b7b 100644
--- a/android/src/main/kotlin/net/mullvad/mullvadvpn/ui/WireguardKeyFragment.kt
+++ b/android/src/main/kotlin/net/mullvad/mullvadvpn/ui/WireguardKeyFragment.kt
@@ -42,7 +42,7 @@ class WireguardKeyFragment : ServiceDependentFragment(OnNoService.GoToLaunchScre
set(value) {
if (field != value) {
field = value
- updateKeyInformation()
+ updateKeySpinners()
updateStatusMessage()
updateGenerateKeyButtonState()
updateVerifyKeyButtonState()
@@ -172,6 +172,19 @@ class WireguardKeyFragment : ServiceDependentFragment(OnNoService.GoToLaunchScre
jobTracker.cancelAllJobs()
}
+ private fun updateKeySpinners() {
+ when (actionState) {
+ is ActionState.Generating -> {
+ publicKey.whenMissing = WhenMissing.ShowSpinner
+ keyAge.whenMissing = WhenMissing.ShowSpinner
+ }
+ is ActionState.Verifying, is ActionState.Idle -> {
+ publicKey.whenMissing = WhenMissing.Nothing
+ keyAge.whenMissing = WhenMissing.Nothing
+ }
+ }
+ }
+
private fun updateKeyInformation() {
when (val keyState = keyStatus) {
is KeygenEvent.NewKey -> {