summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorJanito Vaqueiro Ferreira Filho <janito@mullvad.net>2021-03-08 11:57:04 -0300
committerJanito Vaqueiro Ferreira Filho <janito@mullvad.net>2021-03-08 11:57:04 -0300
commit81d931b2ea75bec54f5878b216985a1610003a4d (patch)
tree88054dd29023b189650ee9361bff8d167d0cab75
parent0ab02461199728cb7a6a34e815bc53dc85d58f1b (diff)
parent895f2b329d67db6a9e7d1f85cf01b9df473430f4 (diff)
downloadmullvadvpn-81d931b2ea75bec54f5878b216985a1610003a4d.tar.xz
mullvadvpn-81d931b2ea75bec54f5878b216985a1610003a4d.zip
Merge branch 'fix-disappearing-account-input-when-history-is-empty'
-rw-r--r--android/src/main/kotlin/net/mullvad/mullvadvpn/ui/widget/AccountLogin.kt6
1 files changed, 4 insertions, 2 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 7d21f0298b..9b2178b0b2 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
@@ -59,9 +59,9 @@ class AccountLogin : RelativeLayout {
get() = MAX_ACCOUNT_HISTORY_ENTRIES * (historyEntryHeight + dividerHeight)
private val expandedHeight: Int
- get() = collapsedHeight + historyHeight
+ get() = collapsedHeight + (historyHeight ?: 0)
- private var historyHeight by observable(0) { _, oldHistoryHeight, newHistoryHeight ->
+ private var historyHeight by observable<Int?>(null) { _, oldHistoryHeight, newHistoryHeight ->
if (newHistoryHeight != oldHistoryHeight) {
historyAnimation.setIntValues(collapsedHeight, expandedHeight)
reposition()
@@ -173,6 +173,8 @@ class AccountLogin : RelativeLayout {
}
)
}
+
+ historyAnimation.setIntValues(collapsedHeight, expandedHeight)
}
fun onDestroy() {