diff --git a/presentation-core/src/main/java/tachiyomi/presentation/core/components/WheelPicker.kt b/presentation-core/src/main/java/tachiyomi/presentation/core/components/WheelPicker.kt index d7a47e7cf..49edce558 100644 --- a/presentation-core/src/main/java/tachiyomi/presentation/core/components/WheelPicker.kt +++ b/presentation-core/src/main/java/tachiyomi/presentation/core/components/WheelPicker.kt @@ -149,7 +149,7 @@ private fun WheelPicker( } val scope = rememberCoroutineScope() - fun onDone() { + val processManualInput: () -> Unit = { scope.launch { items .indexOfFirst { it.toString() == value.text } @@ -158,7 +158,6 @@ private fun WheelPicker( internalOnSelectionChanged(this) lazyListState.scrollToItem(this) } - showManualInput = false } } @@ -167,10 +166,10 @@ private fun WheelPicker( .align(Alignment.Center) .showSoftKeyboard(true) // KMK --> - .clearFocusOnSoftKeyboardHide { onDone() }, + .clearFocusOnSoftKeyboardHide(processManualInput), /* clearFocusOnSoftKeyboardHide doesn't work because onSoftKeyboardHide won't trigger a recomposition => use keyboardActions instead */ - onKeyboardAction = { onDone() }, + onKeyboardAction = { processManualInput() }, // KMK <-- state = value, lineLimits = TextFieldLineLimits.SingleLine,