summaryrefslogtreecommitdiffhomepage
path: root/android/lib/ui
diff options
context:
space:
mode:
authorDavid Göransson <david.goransson@mullvad.net>2025-05-14 14:24:14 +0200
committerDavid Göransson <david.goransson@mullvad.net>2025-05-15 13:23:26 +0200
commitafdc7a31d3d8b7272b7e99c66745d9bd66cdc76c (patch)
treecdc55b4e10beaed1f5372818dcbfa2d08302bff2 /android/lib/ui
parent2f557379f781af58ec4cc752560182688d527d05 (diff)
downloadmullvadvpn-afdc7a31d3d8b7272b7e99c66745d9bd66cdc76c.tar.xz
mullvadvpn-afdc7a31d3d8b7272b7e99c66745d9bd66cdc76c.zip
Fix notification blob colors
Diffstat (limited to 'android/lib/ui')
-rw-r--r--android/lib/ui/component/src/main/kotlin/net/mullvad/mullvadvpn/lib/ui/component/AnimatedNotificationBanner.kt1
-rw-r--r--android/lib/ui/component/src/main/kotlin/net/mullvad/mullvadvpn/lib/ui/component/NotificationData.kt13
2 files changed, 7 insertions, 7 deletions
diff --git a/android/lib/ui/component/src/main/kotlin/net/mullvad/mullvadvpn/lib/ui/component/AnimatedNotificationBanner.kt b/android/lib/ui/component/src/main/kotlin/net/mullvad/mullvadvpn/lib/ui/component/AnimatedNotificationBanner.kt
index 945f40fac9..62c3b5522a 100644
--- a/android/lib/ui/component/src/main/kotlin/net/mullvad/mullvadvpn/lib/ui/component/AnimatedNotificationBanner.kt
+++ b/android/lib/ui/component/src/main/kotlin/net/mullvad/mullvadvpn/lib/ui/component/AnimatedNotificationBanner.kt
@@ -7,7 +7,6 @@ import androidx.compose.animation.slideOutVertically
import androidx.compose.foundation.background
import androidx.compose.foundation.clickable
import androidx.compose.foundation.layout.Box
-import androidx.compose.foundation.layout.Spacer
import androidx.compose.foundation.layout.padding
import androidx.compose.foundation.layout.size
import androidx.compose.foundation.layout.wrapContentWidth
diff --git a/android/lib/ui/component/src/main/kotlin/net/mullvad/mullvadvpn/lib/ui/component/NotificationData.kt b/android/lib/ui/component/src/main/kotlin/net/mullvad/mullvadvpn/lib/ui/component/NotificationData.kt
index 055f662636..ed3da5b1b1 100644
--- a/android/lib/ui/component/src/main/kotlin/net/mullvad/mullvadvpn/lib/ui/component/NotificationData.kt
+++ b/android/lib/ui/component/src/main/kotlin/net/mullvad/mullvadvpn/lib/ui/component/NotificationData.kt
@@ -90,7 +90,7 @@ fun InAppNotification.toNotificationData(
stringResource(id = R.string.new_device_notification_message, deviceName)
.formatWithHtml()
),
- statusLevel = StatusLevel.Info,
+ statusLevel = statusLevel,
action =
NotificationAction(
Icons.Default.Clear,
@@ -102,7 +102,7 @@ fun InAppNotification.toNotificationData(
NotificationData(
title = stringResource(id = R.string.account_credit_expires_soon),
message = LocalContext.current.resources.getExpiryQuantityString(expiry),
- statusLevel = StatusLevel.Error,
+ statusLevel = statusLevel,
action =
if (isPlayBuild) null
else
@@ -118,12 +118,12 @@ fun InAppNotification.toNotificationData(
statusLevel = StatusLevel.None,
)
is InAppNotification.TunnelStateError ->
- errorMessageBannerData(error, onClickShowWireguardPortSettings)
+ errorMessageBannerData(statusLevel, error, onClickShowWireguardPortSettings)
is InAppNotification.UnsupportedVersion ->
NotificationData(
title = stringResource(id = R.string.unsupported_version),
message = stringResource(id = R.string.unsupported_version_description),
- statusLevel = StatusLevel.Error,
+ statusLevel = statusLevel,
action =
NotificationAction(
Icons.AutoMirrored.Default.OpenInNew,
@@ -150,7 +150,7 @@ fun InAppNotification.toNotificationData(
contentDescription =
stringResource(id = R.string.new_changelog_notification_message),
),
- statusLevel = StatusLevel.Info,
+ statusLevel = statusLevel,
action =
NotificationAction(
Icons.Default.Clear,
@@ -162,13 +162,14 @@ fun InAppNotification.toNotificationData(
@Composable
private fun errorMessageBannerData(
+ statusLevel: StatusLevel,
error: ErrorState,
onClickShowWireguardPortSettings: () -> Unit,
) =
NotificationData(
title = error.title().formatWithHtml(),
message = NotificationMessage.Text(error.message(onClickShowWireguardPortSettings)),
- statusLevel = StatusLevel.Error,
+ statusLevel = statusLevel,
)
@Composable