chore: changed "sliderVal" to "sliderValue" for better readability

This commit is contained in:
Alex Schwemler 2026-05-06 20:50:29 +02:00
parent 064a7ccb70
commit 7c0994d957

View file

@ -616,7 +616,7 @@ private fun PlaybackSettingsSection(
var sliderValue by remember(thresholdPercent) { mutableFloatStateOf(thresholdPercent) } var sliderValue by remember(thresholdPercent) { mutableFloatStateOf(thresholdPercent) }
var lastHapticPercent by remember(thresholdPercent) { mutableStateOf(thresholdPercent) } var lastHapticPercent by remember(thresholdPercent) { mutableStateOf(thresholdPercent) }
Slider( Slider(
value = sliderVal, value = sliderValue,
onValueChange = { onValueChange = {
val snapped = snapToStep(it, 0.5f) val snapped = snapToStep(it, 0.5f)
sliderValue = snapped sliderValue = snapped
@ -627,7 +627,7 @@ private fun PlaybackSettingsSection(
} }
}, },
onValueChangeFinished = { onValueChangeFinished = {
PlayerSettingsRepository.setNextEpisodeThresholdPercent(sliderVal) PlayerSettingsRepository.setNextEpisodeThresholdPercent(sliderValue)
}, },
valueRange = 50f..100f, valueRange = 50f..100f,
steps = 49, steps = 49,
@ -669,7 +669,7 @@ private fun PlaybackSettingsSection(
var sliderValue by remember(thresholdMinutes) { mutableFloatStateOf(thresholdMinutes) } var sliderValue by remember(thresholdMinutes) { mutableFloatStateOf(thresholdMinutes) }
var lastHapticMin by remember(thresholdMinutes) { mutableStateOf(thresholdMinutes) } var lastHapticMin by remember(thresholdMinutes) { mutableStateOf(thresholdMinutes) }
Slider( Slider(
value = sliderVal, value = sliderValue,
onValueChange = { onValueChange = {
val snapped = snapToStep(it, 0.5f) val snapped = snapToStep(it, 0.5f)
sliderValue = snapped sliderValue = snapped
@ -680,7 +680,7 @@ private fun PlaybackSettingsSection(
} }
}, },
onValueChangeFinished = { onValueChangeFinished = {
PlayerSettingsRepository.setNextEpisodeThresholdMinutesBeforeEnd(sliderVal) PlayerSettingsRepository.setNextEpisodeThresholdMinutesBeforeEnd(sliderValue)
}, },
valueRange = 1f..15f, valueRange = 1f..15f,
steps = 13, steps = 13,