mirror of
https://github.com/oxen-io/session-android.git
synced 2024-11-21 15:05:19 +00:00
Adjusted NotificationRadioButton that takes string IDs to act as a pass-through
This commit is contained in:
parent
96453f1f1e
commit
5df981bc7a
@ -107,45 +107,15 @@ private fun NotificationRadioButton(
|
||||
checked: Boolean = false,
|
||||
onClick: () -> Unit = {}
|
||||
) {
|
||||
RadioButton(
|
||||
onClick = onClick,
|
||||
// Pass-through from this string ID version to the version that takes strings
|
||||
NotificationRadioButton(
|
||||
titleTxt = stringResource(titleId),
|
||||
explanationTxt = stringResource(explanationId),
|
||||
modifier = modifier,
|
||||
selected = checked,
|
||||
contentPadding = PaddingValues(horizontal = LocalDimensions.current.mediumSpacing, vertical = 7.dp)
|
||||
) {
|
||||
Box(
|
||||
modifier = Modifier
|
||||
.weight(1f)
|
||||
.border(
|
||||
LocalDimensions.current.borderStroke,
|
||||
LocalColors.current.borders,
|
||||
RoundedCornerShape(8.dp)
|
||||
),
|
||||
) {
|
||||
Column(
|
||||
modifier = Modifier.padding(horizontal = LocalDimensions.current.smallSpacing, vertical = LocalDimensions.current.xsSpacing)) {
|
||||
Text(
|
||||
stringResource(titleId),
|
||||
style = LocalType.current.h8
|
||||
tag = tag,
|
||||
checked = checked,
|
||||
onClick = onClick
|
||||
)
|
||||
|
||||
Text(
|
||||
stringResource(explanationId),
|
||||
style = LocalType.current.small,
|
||||
modifier = Modifier.padding(top = LocalDimensions.current.xxsSpacing)
|
||||
)
|
||||
|
||||
tag?.let {
|
||||
Text(
|
||||
stringResource(it),
|
||||
modifier = Modifier.padding(top = LocalDimensions.current.xxsSpacing),
|
||||
color = LocalColors.current.primary,
|
||||
style = LocalType.current.h9
|
||||
)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@Composable
|
||||
|
Loading…
Reference in New Issue
Block a user