feat: add mqtt.root config

pull/618/head
andrekir 2023-04-13 17:06:25 -03:00
rodzic a5a6061c20
commit 5599a5d2a5
1 zmienionych plików z 13 dodań i 0 usunięć

Wyświetl plik

@ -123,6 +123,19 @@ fun ModuleSettingsItemList(viewModel: UIViewModel = viewModel()) {
}
item { Divider() }
item {
EditTextPreference(title = "Root topic",
value = mqttInput.root,
maxSize = 15, // root max_size:16
enabled = connected,
isError = false,
keyboardOptions = KeyboardOptions.Default.copy(
keyboardType = KeyboardType.Text, imeAction = ImeAction.Done
),
keyboardActions = KeyboardActions(onDone = { focusManager.clearFocus() }),
onValueChanged = { mqttInput = mqttInput.copy { root = it } })
}
item {
PreferenceFooter(
enabled = mqttInput != moduleConfig.mqtt,