diff options
| author | Janito Vaqueiro Ferreira Filho <janito@mullvad.net> | 2020-09-04 15:19:14 +0000 |
|---|---|---|
| committer | Janito Vaqueiro Ferreira Filho <janito@mullvad.net> | 2020-09-21 15:28:41 +0000 |
| commit | ca50bcb8a1928213bcc09c184346fd4749658d1f (patch) | |
| tree | 0a2b5fd0f569dabc7c89e4dd1b92e3ba90bb6529 /android/src | |
| parent | 312198865f1b0c42a5c24d22db348604e0bb44c6 (diff) | |
| download | mullvadvpn-ca50bcb8a1928213bcc09c184346fd4749658d1f.tar.xz mullvadvpn-ca50bcb8a1928213bcc09c184346fd4749658d1f.zip | |
Animate when logging in
Diffstat (limited to 'android/src')
| -rw-r--r-- | android/src/main/kotlin/net/mullvad/mullvadvpn/ui/widget/AccountLogin.kt | 20 |
1 files changed, 3 insertions, 17 deletions
diff --git a/android/src/main/kotlin/net/mullvad/mullvadvpn/ui/widget/AccountLogin.kt b/android/src/main/kotlin/net/mullvad/mullvadvpn/ui/widget/AccountLogin.kt index 04d330be2d..f238c635bc 100644 --- a/android/src/main/kotlin/net/mullvad/mullvadvpn/ui/widget/AccountLogin.kt +++ b/android/src/main/kotlin/net/mullvad/mullvadvpn/ui/widget/AccountLogin.kt @@ -55,10 +55,7 @@ class AccountLogin : RelativeLayout { private var inputHasFocus by observable(false) { _, _, hasFocus -> updateBorder() - - if (hasFocus) { - shouldShowAccountHistory = true - } + shouldShowAccountHistory = hasFocus } private var shouldShowAccountHistory by observable(false) { _, isShown, show -> @@ -83,11 +80,8 @@ class AccountLogin : RelativeLayout { updateBorder() - when (newState) { - LoginState.Initial -> {} - LoginState.InProgress -> loggingInState() - LoginState.Success -> successState() - LoginState.Failure -> {} + if (newState == LoginState.Success) { + visibility = View.INVISIBLE } } @@ -137,14 +131,6 @@ class AccountLogin : RelativeLayout { input.onTextChanged.unsubscribe(this) } - private fun loggingInState() { - accountHistoryList.visibility = View.INVISIBLE - } - - private fun successState() { - visibility = View.INVISIBLE - } - private fun updateAccountHistory() { accountHistory?.let { history -> accountHistoryList.apply { |
