diff options
| author | Janito Vaqueiro Ferreira Filho <janito@mullvad.net> | 2020-04-02 19:57:42 +0000 |
|---|---|---|
| committer | Janito Vaqueiro Ferreira Filho <janito@mullvad.net> | 2020-04-27 16:21:51 +0000 |
| commit | 512aa5e227ffba216cb5feb5c2f0f90ed94b79c0 (patch) | |
| tree | e99b28697e9a76018339caf6f77460f342206b84 /android/src | |
| parent | 9d7e206a587472c4d5249a83ab2cb9706587f9d7 (diff) | |
| download | mullvadvpn-512aa5e227ffba216cb5feb5c2f0f90ed94b79c0.tar.xz mullvadvpn-512aa5e227ffba216cb5feb5c2f0f90ed94b79c0.zip | |
Hide spinner correctly
Diffstat (limited to 'android/src')
| -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 } } |
