From 481a8a829796a03eb9b192e8310bdc70dbbd2bf0 Mon Sep 17 00:00:00 2001 From: FunkyMuse Date: Sun, 9 Jul 2023 23:57:51 +0200 Subject: [PATCH] add ripple effect on whole line click --- .../compose/settings/SettingsCheckBoxComponent.kt | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/app/src/main/kotlin/com/simplemobiletools/calculator/compose/settings/SettingsCheckBoxComponent.kt b/app/src/main/kotlin/com/simplemobiletools/calculator/compose/settings/SettingsCheckBoxComponent.kt index 35c3d8b..80e0dfa 100644 --- a/app/src/main/kotlin/com/simplemobiletools/calculator/compose/settings/SettingsCheckBoxComponent.kt +++ b/app/src/main/kotlin/com/simplemobiletools/calculator/compose/settings/SettingsCheckBoxComponent.kt @@ -2,7 +2,6 @@ package com.simplemobiletools.calculator.compose.settings import androidx.compose.animation.AnimatedVisibility import androidx.compose.foundation.clickable -import androidx.compose.foundation.interaction.MutableInteractionSource import androidx.compose.foundation.layout.Column import androidx.compose.foundation.layout.Row import androidx.compose.foundation.layout.fillMaxWidth @@ -10,11 +9,9 @@ import androidx.compose.foundation.layout.padding import androidx.compose.material3.Checkbox import androidx.compose.material3.Text import androidx.compose.runtime.Composable -import androidx.compose.runtime.remember import androidx.compose.ui.Alignment import androidx.compose.ui.Modifier import androidx.compose.ui.unit.dp -import androidx.compose.ui.unit.sp import com.simplemobiletools.calculator.compose.extensions.MyDevices import com.simplemobiletools.calculator.compose.theme.AppThemeSurface import com.simplemobiletools.calculator.compose.theme.preferenceSummaryColor @@ -29,12 +26,11 @@ fun SettingsCheckBoxComponent( isPreferenceEnabled: Boolean = true, onChange: ((Boolean) -> Unit)? = null, ) { - val interactionSource = remember { MutableInteractionSource() } Row( verticalAlignment = Alignment.CenterVertically, modifier = modifier .fillMaxWidth() - .clickable(indication = null, interactionSource = interactionSource, onClick = { onChange?.invoke(!initialValue) }) + .clickable(onClick = { onChange?.invoke(!initialValue) }) .padding(vertical = 14.dp, horizontal = 16.dp), ) { Column(