From 0beed237e474e55dbbd4298be704055534091004 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?David=20G=C3=B6ransson?= Date: Mon, 4 Dec 2023 14:41:55 +0100 Subject: [PATCH] update account history on login/create account --- .../net/mullvad/mullvadvpn/repository/AccountRepository.kt | 4 ++-- 1 file changed, 2 insertions(+), 2 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 1d2a9ca818a7..d1f395d387f3 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 @@ -64,14 +64,14 @@ class AccountRepository( withContext(dispatcher) { val deferred = async { accountCreationEvents.first() } messageHandler.trySendRequest(Request.CreateAccount) - deferred.await() + deferred.await().also { fetchAccountHistory() } } suspend fun login(accountToken: String): LoginResult = withContext(Dispatchers.IO) { val deferred = async { loginEvents.first() } messageHandler.trySendRequest(Request.Login(accountToken)) - deferred.await() + deferred.await().also { fetchAccountHistory() } } fun logout() {