diff options
| author | David Göransson <david.goransson@mullvad.net> | 2024-11-12 14:33:48 +0100 |
|---|---|---|
| committer | David Göransson <david.goransson@mullvad.net> | 2024-11-12 14:33:48 +0100 |
| commit | 5dcf5df15c8bb722849970992ddd62834ad63cb0 (patch) | |
| tree | 69eb0ba8f2b2ba06d5547a668ecd3c166af6eddc /android/app/src/main | |
| parent | eb88e35d7b3c94ad95d4fac23f85e3400d0654bb (diff) | |
| parent | 456a0bb7eab8920b5eda5440fdc68f598e390dcd (diff) | |
| download | mullvadvpn-5dcf5df15c8bb722849970992ddd62834ad63cb0.tar.xz mullvadvpn-5dcf5df15c8bb722849970992ddd62834ad63cb0.zip | |
Merge branch 'fix-account-expiry-in-app-notification-not-resetting-droid-1523'
Diffstat (limited to 'android/app/src/main')
| -rw-r--r-- | android/app/src/main/kotlin/net/mullvad/mullvadvpn/usecase/AccountExpiryInAppNotificationUseCase.kt | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/android/app/src/main/kotlin/net/mullvad/mullvadvpn/usecase/AccountExpiryInAppNotificationUseCase.kt b/android/app/src/main/kotlin/net/mullvad/mullvadvpn/usecase/AccountExpiryInAppNotificationUseCase.kt index 9b71297d36..014f07bf35 100644 --- a/android/app/src/main/kotlin/net/mullvad/mullvadvpn/usecase/AccountExpiryInAppNotificationUseCase.kt +++ b/android/app/src/main/kotlin/net/mullvad/mullvadvpn/usecase/AccountExpiryInAppNotificationUseCase.kt @@ -5,7 +5,6 @@ import kotlinx.coroutines.flow.distinctUntilChanged import kotlinx.coroutines.flow.flatMapLatest import kotlinx.coroutines.flow.flowOf import kotlinx.coroutines.flow.map -import kotlinx.coroutines.flow.onStart import net.mullvad.mullvadvpn.lib.shared.AccountRepository import net.mullvad.mullvadvpn.repository.InAppNotification import net.mullvad.mullvadvpn.service.notifications.accountexpiry.ACCOUNT_EXPIRY_CLOSE_TO_EXPIRY_THRESHOLD @@ -24,12 +23,15 @@ class AccountExpiryInAppNotificationUseCase(private val accountRepository: Accou tickStart = ACCOUNT_EXPIRY_CLOSE_TO_EXPIRY_THRESHOLD, updateInterval = { ACCOUNT_EXPIRY_IN_APP_NOTIFICATION_UPDATE_INTERVAL }, ) - .map { expiresInPeriod -> InAppNotification.AccountExpiry(expiresInPeriod) } + .map { + it?.let { expiresInPeriod -> + InAppNotification.AccountExpiry(expiresInPeriod) + } + } } else { flowOf(null) } } .map(::listOfNotNull) - .onStart { emit(emptyList()) } .distinctUntilChanged() } |
