diff options
| -rw-r--r-- | android/src/main/kotlin/net/mullvad/mullvadvpn/ui/WireguardKeyFragment.kt | 16 |
1 files changed, 5 insertions, 11 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 9df06f44b6..c5a21fd0db 100644 --- a/android/src/main/kotlin/net/mullvad/mullvadvpn/ui/WireguardKeyFragment.kt +++ b/android/src/main/kotlin/net/mullvad/mullvadvpn/ui/WireguardKeyFragment.kt @@ -214,10 +214,12 @@ class WireguardKeyFragment : ServiceDependentFragment(OnNoService.GoToLaunchScre uiJobTracker.newJob("updateStatus", GlobalScope.launch(Dispatchers.Main) { verifyingKeySpinner.visibility = when (actionState) { ActionState.Verifying -> View.VISIBLE - else -> View.INVISIBLE + else -> View.GONE } when (actionState) { + ActionState.Generating -> statusMessage.visibility = View.GONE + ActionState.Verifying -> statusMessage.visibility = View.GONE ActionState.Idle -> { if (hasConnectivity) { updateKeyStatus(keyStatus) @@ -225,14 +227,6 @@ class WireguardKeyFragment : ServiceDependentFragment(OnNoService.GoToLaunchScre updateOfflineStatus() } } - ActionState.Verifying -> { - statusMessage.visibility = View.INVISIBLE - verifyingKeySpinner.visibility = View.VISIBLE - } - ActionState.Generating -> { - statusMessage.visibility = View.INVISIBLE - verifyingKeySpinner.visibility = View.INVISIBLE - } } }) } @@ -253,7 +247,7 @@ class WireguardKeyFragment : ServiceDependentFragment(OnNoService.GoToLaunchScre updateKeyIsValid(keyStatus.verified) } } else { - statusMessage.visibility = View.INVISIBLE + statusMessage.visibility = View.GONE } } @@ -261,7 +255,7 @@ class WireguardKeyFragment : ServiceDependentFragment(OnNoService.GoToLaunchScre when (verified) { true -> setStatusMessage(R.string.wireguard_key_valid, R.color.green) false -> setStatusMessage(R.string.wireguard_key_invalid, R.color.red) - null -> statusMessage.visibility = View.INVISIBLE + null -> statusMessage.visibility = View.GONE } } |
