Make text parts in bold.
This commit is contained in:
@@ -54,6 +54,7 @@ import io.element.android.libraries.designsystem.components.form.textFieldState
|
||||
import io.element.android.libraries.designsystem.components.list.SwitchListItem
|
||||
import io.element.android.libraries.designsystem.preview.ElementPreview
|
||||
import io.element.android.libraries.designsystem.preview.PreviewsDayNight
|
||||
import io.element.android.libraries.designsystem.text.buildAnnotatedStringWithStyledPart
|
||||
import io.element.android.libraries.designsystem.theme.aliasScreenTitle
|
||||
import io.element.android.libraries.designsystem.theme.components.Button
|
||||
import io.element.android.libraries.designsystem.theme.components.Icon
|
||||
@@ -168,14 +169,26 @@ private fun Content(
|
||||
verticalArrangement = Arrangement.spacedBy(16.dp),
|
||||
) {
|
||||
Text(
|
||||
text = stringResource(R.string.screen_deactivate_account_description),
|
||||
text = buildAnnotatedStringWithStyledPart(
|
||||
R.string.screen_deactivate_account_description,
|
||||
R.string.screen_deactivate_account_description_bold_part,
|
||||
color = ElementTheme.colors.textSecondary,
|
||||
bold = true,
|
||||
underline = false,
|
||||
),
|
||||
style = ElementTheme.typography.fontBodyMdRegular,
|
||||
color = ElementTheme.colors.textSecondary,
|
||||
)
|
||||
InfoListOrganism(
|
||||
items = persistentListOf(
|
||||
InfoListItem(
|
||||
message = stringResource(R.string.screen_deactivate_account_list_item_1),
|
||||
message = buildAnnotatedStringWithStyledPart(
|
||||
R.string.screen_deactivate_account_list_item_1,
|
||||
R.string.screen_deactivate_account_list_item_1_bold_part,
|
||||
color = ElementTheme.colors.textSecondary,
|
||||
bold = true,
|
||||
underline = false,
|
||||
),
|
||||
iconComposable = {
|
||||
Icon(
|
||||
modifier = Modifier.size(20.dp),
|
||||
|
||||
@@ -3,8 +3,10 @@
|
||||
<string name="screen_deactivate_account_confirmation_dialog_content">"Please confirm that you want to deactivate your account. This action cannot be undone."</string>
|
||||
<string name="screen_deactivate_account_delete_all_messages">"Delete all my messages"</string>
|
||||
<string name="screen_deactivate_account_delete_all_messages_notice">"Warning: Future users may see incomplete conversations."</string>
|
||||
<string name="screen_deactivate_account_description">"Deactivating your account is irreversible, it will:"</string>
|
||||
<string name="screen_deactivate_account_list_item_1">"Permanently disable your account (you can\'t log back in, and your ID can\'t be reused)."</string>
|
||||
<string name="screen_deactivate_account_description">"Deactivating your account is %1$s, it will:"</string>
|
||||
<string name="screen_deactivate_account_description_bold_part">"irreversible"</string>
|
||||
<string name="screen_deactivate_account_list_item_1">"%1$s your account (you can\'t log back in, and your ID can\'t be reused)."</string>
|
||||
<string name="screen_deactivate_account_list_item_1_bold_part">"Permanently disable"</string>
|
||||
<string name="screen_deactivate_account_list_item_2">"Remove you from all chat rooms."</string>
|
||||
<string name="screen_deactivate_account_list_item_3">"Delete your account information from our identity server."</string>
|
||||
<string name="screen_deactivate_account_list_item_4">"Your messages will still be visible to registered users but won’t be available to new or unregistered users if you choose to delete them."</string>
|
||||
|
||||
@@ -17,6 +17,7 @@ import androidx.compose.runtime.Composable
|
||||
import androidx.compose.ui.Modifier
|
||||
import androidx.compose.ui.graphics.Color
|
||||
import androidx.compose.ui.graphics.vector.ImageVector
|
||||
import androidx.compose.ui.text.AnnotatedString
|
||||
import androidx.compose.ui.text.TextStyle
|
||||
import androidx.compose.ui.unit.Dp
|
||||
import androidx.compose.ui.unit.dp
|
||||
@@ -54,11 +55,19 @@ fun InfoListOrganism(
|
||||
}
|
||||
InfoListItemMolecule(
|
||||
message = {
|
||||
Text(
|
||||
text = item.message,
|
||||
style = textStyle,
|
||||
color = textColor,
|
||||
)
|
||||
if (item.message is AnnotatedString) {
|
||||
Text(
|
||||
text = item.message,
|
||||
style = textStyle,
|
||||
color = textColor,
|
||||
)
|
||||
} else {
|
||||
Text(
|
||||
text = item.message.toString(),
|
||||
style = textStyle,
|
||||
color = textColor,
|
||||
)
|
||||
}
|
||||
},
|
||||
icon = {
|
||||
if (item.iconId != null) {
|
||||
@@ -87,7 +96,7 @@ fun InfoListOrganism(
|
||||
}
|
||||
|
||||
data class InfoListItem(
|
||||
val message: String,
|
||||
val message: CharSequence,
|
||||
@DrawableRes val iconId: Int? = null,
|
||||
val iconVector: ImageVector? = null,
|
||||
val iconComposable: @Composable () -> Unit = {},
|
||||
|
||||
Reference in New Issue
Block a user