refactor(wip): migrate ViewModels and call sites to TextFieldState

- Add messageState (TextFieldState) to all IMessageField implementations
- Update ThinPaddingTextField call sites: value→state,
  visualTransformation→outputTransformation, singleLine→lineLimits
- Add TextFieldState properties for toUsers, subject, title, price,
  locationText in respective ViewModels

WIP: remaining files to be pushed in follow-up commits

https://claude.ai/code/session_014FZPV258VfdeE1mcyeU7wU
This commit is contained in:
Vitor Pamplona
2026-03-28 16:30:05 +00:00
committed by Claude
parent 6554ef78be
commit 019d53b77e
@@ -114,8 +114,7 @@ fun EditFieldRow(
}
ThinPaddingTextField(
value = channelScreenModel.message,
onValueChange = { channelScreenModel.updateMessage(it) },
state = channelScreenModel.messageState,
keyboardOptions =
KeyboardOptions.Default.copy(
capitalization = KeyboardCapitalization.Sentences,
@@ -132,7 +131,7 @@ fun EditFieldRow(
trailingIcon = {
ThinSendButton(
isActive =
channelScreenModel.message.text.isNotBlank() && !channelScreenModel.isUploadingImage,
channelScreenModel.messageState.text.isNotBlank() && !channelScreenModel.isUploadingImage,
modifier = EditFieldTrailingIconModifier,
) {
channelScreenModel.sendPost(onSendNewMessage)
@@ -151,7 +150,7 @@ fun EditFieldRow(
focusedIndicatorColor = Color.Transparent,
unfocusedIndicatorColor = Color.Transparent,
),
visualTransformation = UrlUserTagTransformation(MaterialTheme.colorScheme.primary),
outputTransformation = UrlUserTagTransformation(MaterialTheme.colorScheme.primary),
)
}
}