mirror of
https://github.com/oxen-io/session-android.git
synced 2025-02-16 12:48:26 +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,
|
checked: Boolean = false,
|
||||||
onClick: () -> Unit = {}
|
onClick: () -> Unit = {}
|
||||||
) {
|
) {
|
||||||
RadioButton(
|
// Pass-through from this string ID version to the version that takes strings
|
||||||
onClick = onClick,
|
NotificationRadioButton(
|
||||||
modifier = modifier,
|
titleTxt = stringResource(titleId),
|
||||||
selected = checked,
|
explanationTxt = stringResource(explanationId),
|
||||||
contentPadding = PaddingValues(horizontal = LocalDimensions.current.mediumSpacing, vertical = 7.dp)
|
modifier = modifier,
|
||||||
) {
|
tag = tag,
|
||||||
Box(
|
checked = checked,
|
||||||
modifier = Modifier
|
onClick = onClick
|
||||||
.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
|
|
||||||
)
|
|
||||||
|
|
||||||
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
|
@Composable
|
||||||
|
@ -816,7 +816,7 @@ NOTE: Strings with blank lines have manually been replaced with '\n\n' - this wi
|
|||||||
|
|
||||||
<!-- Missing from CrowdIn circa 2024-08-22 -->
|
<!-- Missing from CrowdIn circa 2024-08-22 -->
|
||||||
<string name="messageStatusUploading">Uploading</string>
|
<string name="messageStatusUploading">Uploading</string>
|
||||||
|
|
||||||
<!-- TODO ACL: Add and tie in these plurals in the morning -ACL 2024-08-27
|
<!-- TODO ACL: Add and tie in these plurals in the morning -ACL 2024-08-27
|
||||||
|
|
||||||
deleteMessage Delete Message Delete Messages
|
deleteMessage Delete Message Delete Messages
|
||||||
|
Loading…
x
Reference in New Issue
Block a user