More fixes

This commit is contained in:
Jorge Martín
2026-05-15 15:04:08 +02:00
committed by Benoit Marty
parent bf1462f9b1
commit 97de57fd79
5 changed files with 17 additions and 12 deletions
@@ -207,7 +207,7 @@ fun AdvancedSettingsView(
if (state.liveLocationMinimumDistanceUpdate != null) {
LiveLocationUpdatesSection(
value = state.liveLocationMinimumDistanceUpdate,
onValueSaved = { value ->
onSaveValue = { value ->
state.eventSink(AdvancedSettingsEvents.SetLiveLocationMinimumDistanceUpdate(value))
},
onOpenAppPermissionsClick = onOpenAppSettingsClick,
@@ -340,11 +340,11 @@ private fun ModerationAndSafety(
@Composable
private fun LiveLocationUpdatesSection(
value: Int,
onValueSaved: (Int) -> Unit,
onSaveValue: (Int) -> Unit,
onOpenAppPermissionsClick: () -> Unit,
modifier: Modifier = Modifier,
) {
val updatedOnValueSaved by rememberUpdatedState(onValueSaved)
val updatedOnSaveValue by rememberUpdatedState(onSaveValue)
PreferenceCategory(
modifier = modifier,
showTopDivider = true,
@@ -384,7 +384,7 @@ private fun LiveLocationUpdatesSection(
value = sliderValue.toFloat(),
onValueChange = { sliderValue = it.roundToInt() },
onValueChangeFinish = {
updatedOnValueSaved(sliderValue)
updatedOnSaveValue(sliderValue)
},
valueRange = valueRange,
colors = SliderDefaults.colors(