diff --git a/app/src/main/java/com/geeksville/mesh/ui/DeviceSettingsItemList.kt b/app/src/main/java/com/geeksville/mesh/ui/DeviceSettingsItemList.kt index f8aba16d3..e9cd7564e 100644 --- a/app/src/main/java/com/geeksville/mesh/ui/DeviceSettingsItemList.kt +++ b/app/src/main/java/com/geeksville/mesh/ui/DeviceSettingsItemList.kt @@ -792,7 +792,10 @@ fun DeviceSettingsItemList(viewModel: UIViewModel) { value = bluetoothInput.fixedPin, enabled = connected, keyboardActions = KeyboardActions(onDone = { focusManager.clearFocus() }), - onValueChanged = { bluetoothInput = bluetoothInput.copy { fixedPin = it } }) + onValueChanged = { + if (it.toString().length == 6) // ensure 6 digits + bluetoothInput = bluetoothInput.copy { fixedPin = it } + }) } item {