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/service/src | |
| 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/service/src')
| -rw-r--r-- | android/service/src/main/kotlin/net/mullvad/mullvadvpn/service/notifications/accountexpiry/AccountExpiryTickerFlow.kt | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/android/service/src/main/kotlin/net/mullvad/mullvadvpn/service/notifications/accountexpiry/AccountExpiryTickerFlow.kt b/android/service/src/main/kotlin/net/mullvad/mullvadvpn/service/notifications/accountexpiry/AccountExpiryTickerFlow.kt index c3a444f5ed..3683096c80 100644 --- a/android/service/src/main/kotlin/net/mullvad/mullvadvpn/service/notifications/accountexpiry/AccountExpiryTickerFlow.kt +++ b/android/service/src/main/kotlin/net/mullvad/mullvadvpn/service/notifications/accountexpiry/AccountExpiryTickerFlow.kt @@ -10,7 +10,7 @@ fun expiryTickerFlow( expiry: DateTime, tickStart: Duration, updateInterval: (expiry: DateTime) -> Duration, -): Flow<Duration> = flow { +): Flow<Duration?> = flow { expiry.millisFromNow().let { expiryMillis -> if (expiryMillis <= 0) { // Has expired. @@ -18,6 +18,8 @@ fun expiryTickerFlow( return@flow } if (expiryMillis > tickStart.millis) { + // Emit null if no expiry notification should be provided. + emit(null) // Delay until the time we should start emitting. delay(expiryMillis - tickStart.millis + 1) } |
