diff options
Diffstat (limited to 'android/src')
| -rw-r--r-- | android/src/main/kotlin/net/mullvad/mullvadvpn/ui/ConnectFragment.kt | 4 |
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) |
