From 5df981bc7ab4736e1a96ef4f585f063189f95740 Mon Sep 17 00:00:00 2001 From: alansley Date: Tue, 27 Aug 2024 15:51:38 +1000 Subject: [PATCH] Adjusted NotificationRadioButton that takes string IDs to act as a pass-through --- .../MessageNotifications.kt | 48 ++++--------------- libsession/src/main/res/values/strings.xml | 2 +- 2 files changed, 10 insertions(+), 40 deletions(-) diff --git a/app/src/main/java/org/thoughtcrime/securesms/onboarding/messagenotifications/MessageNotifications.kt b/app/src/main/java/org/thoughtcrime/securesms/onboarding/messagenotifications/MessageNotifications.kt index 640f2be946..7e9846a385 100644 --- a/app/src/main/java/org/thoughtcrime/securesms/onboarding/messagenotifications/MessageNotifications.kt +++ b/app/src/main/java/org/thoughtcrime/securesms/onboarding/messagenotifications/MessageNotifications.kt @@ -107,45 +107,15 @@ private fun NotificationRadioButton( checked: Boolean = false, onClick: () -> Unit = {} ) { - RadioButton( - onClick = onClick, - 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 - ) - - 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 - ) - } - } - } - } + // Pass-through from this string ID version to the version that takes strings + NotificationRadioButton( + titleTxt = stringResource(titleId), + explanationTxt = stringResource(explanationId), + modifier = modifier, + tag = tag, + checked = checked, + onClick = onClick + ) } @Composable diff --git a/libsession/src/main/res/values/strings.xml b/libsession/src/main/res/values/strings.xml index bd021d729d..69c87854b2 100644 --- a/libsession/src/main/res/values/strings.xml +++ b/libsession/src/main/res/values/strings.xml @@ -816,7 +816,7 @@ NOTE: Strings with blank lines have manually been replaced with '\n\n' - this wi Uploading - +