diff options
| author | Jonatan Rhodin <jonatan.rhodin@mullvad.net> | 2023-11-17 20:09:19 +0100 |
|---|---|---|
| committer | Jonatan Rhodin <jonatan.rhodin@mullvad.net> | 2023-11-21 16:42:44 +0100 |
| commit | 657f1c3c4dc5b3ed3eeb113eb27285e4d0c991ee (patch) | |
| tree | ee33a84e1a31e449b78c5b42fc686af57fa64c88 /android/app/src/main | |
| parent | e98cececf47881900ffae5990260458c02cc4d76 (diff) | |
| download | mullvadvpn-657f1c3c4dc5b3ed3eeb113eb27285e4d0c991ee.tar.xz mullvadvpn-657f1c3c4dc5b3ed3eeb113eb27285e4d0c991ee.zip | |
Fix issue with the welcome screen showing up after buying time
Diffstat (limited to 'android/app/src/main')
| -rw-r--r-- | android/app/src/main/kotlin/net/mullvad/mullvadvpn/repository/AccountRepository.kt | 2 | ||||
| -rw-r--r-- | android/app/src/main/kotlin/net/mullvad/mullvadvpn/viewmodel/ConnectViewModel.kt | 6 |
2 files changed, 7 insertions, 1 deletions
diff --git a/android/app/src/main/kotlin/net/mullvad/mullvadvpn/repository/AccountRepository.kt b/android/app/src/main/kotlin/net/mullvad/mullvadvpn/repository/AccountRepository.kt index eb618ea0f8..1d2a9ca818 100644 --- a/android/app/src/main/kotlin/net/mullvad/mullvadvpn/repository/AccountRepository.kt +++ b/android/app/src/main/kotlin/net/mullvad/mullvadvpn/repository/AccountRepository.kt @@ -91,7 +91,7 @@ class AccountRepository( messageHandler.trySendRequest(Request.ClearAccountHistory) } - private fun clearCreatedAccountCache() { + fun clearCreatedAccountCache() { _cachedCreatedAccount.value = null } } diff --git a/android/app/src/main/kotlin/net/mullvad/mullvadvpn/viewmodel/ConnectViewModel.kt b/android/app/src/main/kotlin/net/mullvad/mullvadvpn/viewmodel/ConnectViewModel.kt index 9f6cec8391..89b83d9f11 100644 --- a/android/app/src/main/kotlin/net/mullvad/mullvadvpn/viewmodel/ConnectViewModel.kt +++ b/android/app/src/main/kotlin/net/mullvad/mullvadvpn/viewmodel/ConnectViewModel.kt @@ -133,6 +133,12 @@ class ConnectViewModel( .debounce(UI_STATE_DEBOUNCE_DURATION_MILLIS) .stateIn(viewModelScope, SharingStarted.WhileSubscribed(), ConnectUiState.INITIAL) + init { + // The create account cache is no longer needed as we have successfully reached the connect + // screen + accountRepository.clearCreatedAccountCache() + } + private fun LocationInfoCache.locationCallbackFlow() = callbackFlow { onNewLocation = { this.trySend(it) } awaitClose { onNewLocation = null } |
