@ -33,7 +33,7 @@ import org.mozilla.fenix.theme.FirefoxTheme
* /
* /
@Composable
@Composable
fun ReviewQualityCheckSettingsCard (
fun ReviewQualityCheckSettingsCard (
productRecommendationsEnabled : Boolean ,
productRecommendationsEnabled : Boolean ? ,
onProductRecommendationsEnabledStateChange : ( Boolean ) -> Unit ,
onProductRecommendationsEnabledStateChange : ( Boolean ) -> Unit ,
onTurnOffReviewQualityCheckClick : ( ) -> Unit ,
onTurnOffReviewQualityCheckClick : ( ) -> Unit ,
modifier : Modifier = Modifier ,
modifier : Modifier = Modifier ,
@ -53,7 +53,7 @@ fun ReviewQualityCheckSettingsCard(
@Composable
@Composable
private fun SettingsContent (
private fun SettingsContent (
productRecommendationsEnabled : Boolean ,
productRecommendationsEnabled : Boolean ? ,
onProductRecommendationsEnabledStateChange : ( Boolean ) -> Unit ,
onProductRecommendationsEnabledStateChange : ( Boolean ) -> Unit ,
onTurnOffReviewQualityCheckClick : ( ) -> Unit ,
onTurnOffReviewQualityCheckClick : ( ) -> Unit ,
modifier : Modifier = Modifier ,
modifier : Modifier = Modifier ,
@ -61,13 +61,15 @@ private fun SettingsContent(
Column ( modifier = modifier ) {
Column ( modifier = modifier ) {
Spacer ( modifier = Modifier . height ( 8. dp ) )
Spacer ( modifier = Modifier . height ( 8. dp ) )
SwitchWithLabel (
if ( productRecommendationsEnabled != null ) {
checked = productRecommendationsEnabled ,
SwitchWithLabel (
onCheckedChange = onProductRecommendationsEnabledStateChange ,
checked = productRecommendationsEnabled ,
label = stringResource ( R . string . review _quality _check _settings _recommended _products ) ,
onCheckedChange = onProductRecommendationsEnabledStateChange ,
)
label = stringResource ( R . string . review _quality _check _settings _recommended _products ) ,
)
Spacer ( modifier = Modifier . height ( 16. dp ) )
Spacer ( modifier = Modifier . height ( 16. dp ) )
}
SecondaryButton (
SecondaryButton (
text = stringResource ( R . string . review _quality _check _settings _turn _off ) ,
text = stringResource ( R . string . review _quality _check _settings _turn _off ) ,