mirror of
https://github.com/omnivore-app/omnivore.git
synced 2026-03-11 08:54:26 +00:00
avoid divide by zero error?
This commit is contained in:
parent
c9afcd0c86
commit
cd59eedcf0
1 changed files with 2 additions and 1 deletions
|
|
@ -45,7 +45,8 @@ fun SliderWithPlusMinus(
|
|||
interactionSource: MutableInteractionSource = remember { MutableInteractionSource() }
|
||||
) {
|
||||
var sliderValue by remember { mutableFloatStateOf(value) }
|
||||
val sliderValueStepSize = (valueRange.endInclusive - valueRange.start) / steps
|
||||
val sliderValueStepSize = if (steps == 0) 0f else
|
||||
(valueRange.endInclusive - valueRange.start) / steps
|
||||
|
||||
return Row(
|
||||
modifier = modifier
|
||||
|
|
|
|||
Loading…
Reference in a new issue