diff options
| author | Kalle Lindström <karl.lindstrom@mullvad.net> | 2025-02-25 10:48:50 +0100 |
|---|---|---|
| committer | Kalle Lindström <karl.lindstrom@mullvad.net> | 2025-02-26 09:25:17 +0100 |
| commit | da304ffedf8f8d98600f31f737cf92768c0323fa (patch) | |
| tree | e8da9b9a861f3d3efbbbc39fb5160ec1cfeb67fa /android/lib/shared/src | |
| parent | 5025db74b34cfb3536c43f89f3407ffc0d97ae73 (diff) | |
| download | mullvadvpn-da304ffedf8f8d98600f31f737cf92768c0323fa.tar.xz mullvadvpn-da304ffedf8f8d98600f31f737cf92768c0323fa.zip | |
Remove Joda Time and use java.time package instead
Joda Time has been superseded by the Java 8 java.time package
which has more or less the same API. This commit removes all
usage of Joda Time and replaces it with the java.time classes.
This is done so that we can remove the dependency on Joda Time.
Diffstat (limited to 'android/lib/shared/src')
| -rw-r--r-- | android/lib/shared/src/main/kotlin/net/mullvad/mullvadvpn/lib/shared/AccountRepository.kt | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/android/lib/shared/src/main/kotlin/net/mullvad/mullvadvpn/lib/shared/AccountRepository.kt b/android/lib/shared/src/main/kotlin/net/mullvad/mullvadvpn/lib/shared/AccountRepository.kt index f6b146ecd3..a0edc2faa6 100644 --- a/android/lib/shared/src/main/kotlin/net/mullvad/mullvadvpn/lib/shared/AccountRepository.kt +++ b/android/lib/shared/src/main/kotlin/net/mullvad/mullvadvpn/lib/shared/AccountRepository.kt @@ -2,6 +2,7 @@ package net.mullvad.mullvadvpn.lib.shared import arrow.core.Either import arrow.core.raise.nullable +import java.time.ZonedDateTime import kotlinx.coroutines.CoroutineScope import kotlinx.coroutines.flow.MutableSharedFlow import kotlinx.coroutines.flow.MutableStateFlow @@ -21,7 +22,6 @@ import net.mullvad.mullvadvpn.lib.model.CreateAccountError import net.mullvad.mullvadvpn.lib.model.DeviceState import net.mullvad.mullvadvpn.lib.model.LoginAccountError import net.mullvad.mullvadvpn.lib.model.WebsiteAuthToken -import org.joda.time.DateTime class AccountRepository( private val managementService: ManagementService, @@ -87,7 +87,7 @@ class AccountRepository( suspend fun getWebsiteAuthToken(): WebsiteAuthToken? = managementService.getWebsiteAuthToken().getOrNull() - internal suspend fun onVoucherRedeemed(newExpiry: DateTime) { + internal suspend fun onVoucherRedeemed(newExpiry: ZonedDateTime) { accountData.value?.copy(expiryDate = newExpiry)?.let { _mutableAccountDataCache.emit(it) } } } |
