summaryrefslogtreecommitdiffhomepage
path: root/android/app
diff options
context:
space:
mode:
authorJonatan Rhodin <jonatan.rhodin@mullvad.net>2023-11-17 11:01:38 +0100
committerAlbin <albin@mullvad.net>2023-11-17 14:59:10 +0100
commit679cb9144355c3fbd05f5af3341e9c8eeb2d2c42 (patch)
treef5c90eda4490b7af27e21a0a8b69e1a0f76b9dd3 /android/app
parent5cc490d6eccc5624c075d8fdb21ce0abdd1c17b1 (diff)
downloadmullvadvpn-679cb9144355c3fbd05f5af3341e9c8eeb2d2c42.tar.xz
mullvadvpn-679cb9144355c3fbd05f5af3341e9c8eeb2d2c42.zip
Fix missing bold support for Always on VPN error banner
Diffstat (limited to 'android/app')
-rw-r--r--android/app/src/main/kotlin/net/mullvad/mullvadvpn/compose/component/notificationbanner/NotificationData.kt15
1 files changed, 13 insertions, 2 deletions
diff --git a/android/app/src/main/kotlin/net/mullvad/mullvadvpn/compose/component/notificationbanner/NotificationData.kt b/android/app/src/main/kotlin/net/mullvad/mullvadvpn/compose/component/notificationbanner/NotificationData.kt
index 3fbf0ad095..16efa6c88b 100644
--- a/android/app/src/main/kotlin/net/mullvad/mullvadvpn/compose/component/notificationbanner/NotificationData.kt
+++ b/android/app/src/main/kotlin/net/mullvad/mullvadvpn/compose/component/notificationbanner/NotificationData.kt
@@ -113,8 +113,19 @@ private fun errorMessageBannerData(error: ErrorState) =
error.getErrorNotificationResources(LocalContext.current).run {
NotificationData(
title = stringResource(id = titleResourceId),
- message = optionalMessageArgument?.let { stringResource(id = messageResourceId, it) }
- ?: stringResource(id = messageResourceId),
+ message =
+ HtmlCompat.fromHtml(
+ optionalMessageArgument?.let { stringResource(id = messageResourceId, it) }
+ ?: stringResource(id = messageResourceId),
+ HtmlCompat.FROM_HTML_MODE_COMPACT
+ )
+ .toAnnotatedString(
+ boldSpanStyle =
+ SpanStyle(
+ color = MaterialTheme.colorScheme.onBackground,
+ fontWeight = FontWeight.ExtraBold
+ )
+ ),
statusLevel = StatusLevel.Error,
action = null
)