diff options
| author | David Göransson <david.goransson@mullvad.net> | 2025-05-15 13:54:08 +0200 |
|---|---|---|
| committer | David Göransson <david.goransson@mullvad.net> | 2025-05-15 13:54:08 +0200 |
| commit | 1957ca9181c3badffc103166c3d4f668694e0345 (patch) | |
| tree | 8d2988cca39fd83fb7ace454b6bca6348facb9d3 /android/lib/model/src | |
| parent | 5cad8a58a60dd5b544ef96820a7be965b9a3febd (diff) | |
| parent | 2658a984765bae7d097b530acf92d47aabe52da1 (diff) | |
| download | mullvadvpn-1957ca9181c3badffc103166c3d4f668694e0345.tar.xz mullvadvpn-1957ca9181c3badffc103166c3d4f668694e0345.zip | |
Merge branch 'design-review-changes'
Diffstat (limited to 'android/lib/model/src')
| -rw-r--r-- | android/lib/model/src/main/kotlin/net/mullvad/mullvadvpn/lib/model/InAppNotification.kt | 18 |
1 files changed, 12 insertions, 6 deletions
diff --git a/android/lib/model/src/main/kotlin/net/mullvad/mullvadvpn/lib/model/InAppNotification.kt b/android/lib/model/src/main/kotlin/net/mullvad/mullvadvpn/lib/model/InAppNotification.kt index fdaa5f3c9d..7a681da66c 100644 --- a/android/lib/model/src/main/kotlin/net/mullvad/mullvadvpn/lib/model/InAppNotification.kt +++ b/android/lib/model/src/main/kotlin/net/mullvad/mullvadvpn/lib/model/InAppNotification.kt @@ -6,6 +6,7 @@ enum class StatusLevel { Error, Warning, Info, + None, } sealed class InAppNotification { @@ -13,18 +14,23 @@ sealed class InAppNotification { abstract val priority: Long data class TunnelStateError(val error: ErrorState) : InAppNotification() { - override val statusLevel = StatusLevel.Error - override val priority: Long = 1001 + override val statusLevel = + if (error.cause is ErrorStateCause.IsOffline) { + StatusLevel.Warning + } else { + StatusLevel.Error + } + override val priority: Long = 1004 } data object TunnelStateBlocked : InAppNotification() { - override val statusLevel = StatusLevel.Error - override val priority: Long = 1000 + override val statusLevel = StatusLevel.None + override val priority: Long = 1003 } data class UnsupportedVersion(val versionInfo: VersionInfo) : InAppNotification() { override val statusLevel = StatusLevel.Error - override val priority: Long = 999 + override val priority: Long = 1002 } data class AccountExpiry(val expiry: Duration) : InAppNotification() { @@ -39,6 +45,6 @@ sealed class InAppNotification { data object NewVersionChangelog : InAppNotification() { override val statusLevel = StatusLevel.Info - override val priority: Long = 1001 + override val priority: Long = 1000 } } |
