feat: add BluetoothConfig.fixedPin validation

pull/566/head
andrekir 2023-01-10 17:32:50 -03:00
rodzic eaaadf3b34
commit 22e83ba953
1 zmienionych plików z 4 dodań i 1 usunięć

Wyświetl plik

@ -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 {