mirror of
https://github.com/meshtastic/Meshtastic-Android.git
synced 2026-05-12 08:42:01 -04:00
fix(canned-messages): enable multiline text editing for long message lists (#5203)
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
This commit is contained in:
@@ -205,6 +205,7 @@ fun EditTextPreference(
|
||||
onFocusChanged: (FocusState) -> Unit = {},
|
||||
trailingIcon: (@Composable () -> Unit)? = null,
|
||||
visualTransformation: VisualTransformation = VisualTransformation.None,
|
||||
multiline: Boolean = false,
|
||||
) {
|
||||
var isFocused by remember { mutableStateOf(false) }
|
||||
|
||||
@@ -212,7 +213,8 @@ fun EditTextPreference(
|
||||
OutlinedTextField(
|
||||
modifier = Modifier.fillMaxWidth().onFocusEvent { onFocusChanged(it) },
|
||||
value = value,
|
||||
singleLine = true,
|
||||
singleLine = !multiline,
|
||||
maxLines = if (multiline) 5 else 1,
|
||||
enabled = enabled,
|
||||
isError = isError,
|
||||
onValueChange = {
|
||||
|
||||
@@ -181,6 +181,7 @@ fun CannedMessageConfigScreen(viewModel: RadioConfigViewModel, onBack: () -> Uni
|
||||
KeyboardOptions.Default.copy(keyboardType = KeyboardType.Text, imeAction = ImeAction.Done),
|
||||
keyboardActions = KeyboardActions(onDone = { focusManager.clearFocus() }),
|
||||
onValueChanged = { messagesInput = it },
|
||||
multiline = true,
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user