Extract custom status text max length into a constant

This commit is contained in:
ganfra
2026-06-17 17:37:21 +02:00
parent dd24e14cf6
commit d29dad40f9
@@ -205,6 +205,8 @@ private fun UserStatusPickerBottomSheet(
} }
} }
private const val CUSTOM_STATUS_TEXT_MAX_LENGTH = 30
@Composable @Composable
private fun CustomStatusInputRow( private fun CustomStatusInputRow(
emoji: String, emoji: String,
@@ -232,7 +234,7 @@ private fun CustomStatusInputRow(
modifier = Modifier.focusRequester(focusRequester), modifier = Modifier.focusRequester(focusRequester),
state = textFieldState, state = textFieldState,
placeholder = stringResource(R.string.screen_preferences_user_status_custom_hint), placeholder = stringResource(R.string.screen_preferences_user_status_custom_hint),
inputTransformation = InputTransformation.maxLength(maxLength = 30), inputTransformation = InputTransformation.maxLength(CUSTOM_STATUS_TEXT_MAX_LENGTH),
keyboardOptions = KeyboardOptions(imeAction = ImeAction.Done), keyboardOptions = KeyboardOptions(imeAction = ImeAction.Done),
onKeyboardAction = { if (hasChanges) onConfirm() }, onKeyboardAction = { if (hasChanges) onConfirm() },
lineLimits = TextFieldLineLimits.SingleLine, lineLimits = TextFieldLineLimits.SingleLine,