[demo-compose] Refactor modifier with better Kotlin syntax

PiperOrigin-RevId: 713476190
This commit is contained in:
jbibik 2025-01-08 17:49:03 -08:00 committed by Copybara-Service
parent 314413365b
commit 709d3fd35e

View file

@ -23,13 +23,10 @@ import androidx.compose.runtime.remember
import androidx.compose.ui.Modifier
@Composable
internal fun Modifier.noRippleClickable(onClick: () -> Unit): Modifier {
return then(
clickable(
interactionSource = remember { MutableInteractionSource() },
indication = null, // to prevent the ripple from the tap
) {
onClick()
}
)
}
internal fun Modifier.noRippleClickable(onClick: () -> Unit): Modifier =
clickable(
interactionSource = remember { MutableInteractionSource() },
indication = null, // to prevent the ripple from the tap
) {
onClick()
}