mirror of
https://github.com/vitorpamplona/amethyst.git
synced 2026-08-10 08:27:04 +00:00
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:
+3
-4
@@ -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),
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user