From 13210343dbfea39e572e78428bc9b094a9a0fc41 Mon Sep 17 00:00:00 2001 From: Dave Severns <149429124+dseverns-livefront@users.noreply.github.com> Date: Thu, 14 Nov 2024 15:36:01 -0500 Subject: [PATCH] PM-14429 Set the min and max range of the slider to match the restrictions not update the min with the computed min. (#4305) --- .../ui/tools/feature/generator/GeneratorScreen.kt | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/app/src/main/java/com/x8bit/bitwarden/ui/tools/feature/generator/GeneratorScreen.kt b/app/src/main/java/com/x8bit/bitwarden/ui/tools/feature/generator/GeneratorScreen.kt index 6b67f6f81..61e617ed4 100644 --- a/app/src/main/java/com/x8bit/bitwarden/ui/tools/feature/generator/GeneratorScreen.kt +++ b/app/src/main/java/com/x8bit/bitwarden/ui/tools/feature/generator/GeneratorScreen.kt @@ -455,8 +455,12 @@ private fun ColumnScope.PasswordTypeContent( BitwardenSlider( value = passwordTypeState.length, - onValueChange = passwordHandlers.onPasswordSliderLengthChange, - range = passwordTypeState.computedMinimumLength..passwordTypeState.maxLength, + onValueChange = { newValue, isUserInteracting -> + if (newValue >= passwordTypeState.computedMinimumLength) { + passwordHandlers.onPasswordSliderLengthChange(newValue, isUserInteracting) + } + }, + range = passwordTypeState.minLength..passwordTypeState.maxLength, sliderTag = "PasswordLengthSlider", valueTag = "PasswordLengthLabel", modifier = Modifier