This commit is contained in:
Benoit Marty 2024-05-28 00:14:23 +02:00
parent 79057678d7
commit 414e2bb3f1
2 changed files with 11 additions and 13 deletions

View file

@ -61,16 +61,14 @@ fun PreferenceCheckbox(
color = enabled.toEnabledColor(),
)
},
supportingContent = if (supportingText != null) {
supportingContent = supportingText?.let {
{
Text(
style = ElementTheme.typography.fontBodyMdRegular,
text = supportingText,
text = it,
color = enabled.toSecondaryEnabledColor(),
)
}
} else {
null
},
trailingContent = ListItemContent.Checkbox(
checked = isChecked,

View file

@ -90,16 +90,16 @@ fun PreferenceText(
color = tintColor ?: enabled.toSecondaryEnabledColor(),
)
}
} else if (subtitleAnnotated != null) {
{
Text(
style = ElementTheme.typography.fontBodyMdRegular,
text = subtitleAnnotated,
color = tintColor ?: enabled.toSecondaryEnabledColor(),
)
}
} else {
null
subtitleAnnotated?.let {
{
Text(
style = ElementTheme.typography.fontBodyMdRegular,
text = it,
color = tintColor ?: enabled.toSecondaryEnabledColor(),
)
}
}
},
trailingContent = if (currentValue != null || loadingCurrentValue || showEndBadge) {
ListItemContent.Custom {