From 56992c02ee0f3fd680009662eb3a71d125734df3 Mon Sep 17 00:00:00 2001 From: Hai Zhang Date: Tue, 10 Sep 2024 13:13:29 -0700 Subject: [PATCH] Revert "Feat: Add widgetContainer to SliderPreference" This reverts commit 2857e395b14336a29b5be80033007241a7df9a13. Because it shouldn't have been added to such a dedicated preference. --- .../java/me/zhanghai/compose/preference/SliderPreference.kt | 6 ------ 1 file changed, 6 deletions(-) diff --git a/library/src/main/java/me/zhanghai/compose/preference/SliderPreference.kt b/library/src/main/java/me/zhanghai/compose/preference/SliderPreference.kt index d7932d5..79d8694 100644 --- a/library/src/main/java/me/zhanghai/compose/preference/SliderPreference.kt +++ b/library/src/main/java/me/zhanghai/compose/preference/SliderPreference.kt @@ -57,7 +57,6 @@ inline fun LazyListScope.sliderPreference( noinline icon: @Composable ((Float) -> Unit)? = null, noinline summary: @Composable ((Float) -> Unit)? = null, noinline valueText: @Composable ((Float) -> Unit)? = null, - noinline widgetContainer: @Composable ((Float) -> Unit)? = null, ) { item(key = key, contentType = "SliderPreference") { val state = rememberState() @@ -75,7 +74,6 @@ inline fun LazyListScope.sliderPreference( icon = icon?.let { { it(sliderValue) } }, summary = summary?.let { { it(sliderValue) } }, valueText = valueText?.let { { it(sliderValue) } }, - widgetContainer = widgetContainer?.let { { it(sliderValue) } }, ) } } @@ -92,7 +90,6 @@ fun SliderPreference( icon: @Composable (() -> Unit)? = null, summary: @Composable (() -> Unit)? = null, valueText: @Composable (() -> Unit)? = null, - widgetContainer: @Composable (() -> Unit)? = null, ) { var value by state var sliderValue by sliderState @@ -109,7 +106,6 @@ fun SliderPreference( icon = icon, summary = summary, valueText = valueText, - widgetContainer = widgetContainer, ) } @@ -127,7 +123,6 @@ fun SliderPreference( icon: @Composable (() -> Unit)? = null, summary: @Composable (() -> Unit)? = null, valueText: @Composable (() -> Unit)? = null, - widgetContainer: @Composable (() -> Unit)? = null, ) { var lastValue by remember { mutableFloatStateOf(value) } SideEffect { @@ -170,7 +165,6 @@ fun SliderPreference( } } }, - widgetContainer = widgetContainer, ) }