limit short name length

This commit is contained in:
andrekir 2022-11-09 07:20:05 -03:00
parent 9a71092b5f
commit a10b55a5ed

View file

@ -83,7 +83,7 @@ fun PreferenceItemList(viewModel: UIViewModel) {
item {
EditTextPreference(title = "Short name",
value = userInput?.shortName ?: stringResource(id = R.string.unknown),
value = userInput?.shortName?.take(4) ?: stringResource(id = R.string.unknown),
enabled = connected && userInput?.shortName != null,
keyboardOptions = KeyboardOptions.Default.copy(
keyboardType = KeyboardType.Text, imeAction = ImeAction.Send