diff options
Diffstat (limited to 'android')
| -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 { |
