summaryrefslogtreecommitdiffhomepage
path: root/android/src
diff options
context:
space:
mode:
authorJanito Vaqueiro Ferreira Filho <janito@mullvad.net>2020-05-22 17:40:29 +0000
committerJanito Vaqueiro Ferreira Filho <janito@mullvad.net>2020-05-28 18:03:44 +0000
commita844214e63b01efecd99b6353cec8875031ba1a6 (patch)
tree00b67b0ced7dc5598c9b100bf00ee3a5d5c02e42 /android/src
parent10140a730ece2f44e8b62aab6af04bc8c27fd91c (diff)
downloadmullvadvpn-a844214e63b01efecd99b6353cec8875031ba1a6.tar.xz
mullvadvpn-a844214e63b01efecd99b6353cec8875031ba1a6.zip
Use new event notifiers in `ConnectFragment`
Diffstat (limited to 'android/src')
-rw-r--r--android/src/main/kotlin/net/mullvad/mullvadvpn/ui/ConnectFragment.kt4
1 files changed, 2 insertions, 2 deletions
diff --git a/android/src/main/kotlin/net/mullvad/mullvadvpn/ui/ConnectFragment.kt b/android/src/main/kotlin/net/mullvad/mullvadvpn/ui/ConnectFragment.kt
index 6b8fe59409..2a9d54f59e 100644
--- a/android/src/main/kotlin/net/mullvad/mullvadvpn/ui/ConnectFragment.kt
+++ b/android/src/main/kotlin/net/mullvad/mullvadvpn/ui/ConnectFragment.kt
@@ -90,7 +90,7 @@ class ConnectFragment : ServiceDependentFragment(OnNoService.GoToLaunchScreen) {
}
}
- accountCache.onAccountDataChange = { _, expiry ->
+ accountCache.onAccountExpiryChange.subscribe(this) { expiry ->
if (expiry?.isBeforeNow() ?: false) {
openOutOfTimeScreen()
} else if (expiry != null) {
@@ -100,10 +100,10 @@ class ConnectFragment : ServiceDependentFragment(OnNoService.GoToLaunchScreen) {
}
override fun onSafelyPause() {
- accountCache.onAccountDataChange = null
locationInfoCache.onNewLocation = null
relayListListener.onRelayListChange = null
+ accountCache.onAccountExpiryChange.unsubscribe(this)
keyStatusListener.onKeyStatusChange.unsubscribe(this)
connectionProxy.onUiStateChange.unsubscribe(this)