feat: Add AppleEmojiTextField component for enhanced emoji input with PNG support
This commit is contained in:
@@ -42,6 +42,7 @@ import com.rosetta.messenger.network.SearchUser
|
||||
import com.rosetta.messenger.ui.onboarding.PrimaryBlue
|
||||
import com.rosetta.messenger.ui.components.VerifiedBadge
|
||||
import com.rosetta.messenger.ui.components.AppleEmojiPickerPanel
|
||||
import com.rosetta.messenger.ui.components.AppleEmojiTextField
|
||||
import kotlinx.coroutines.launch
|
||||
import java.text.SimpleDateFormat
|
||||
import java.util.*
|
||||
@@ -518,35 +519,21 @@ private fun MessageInputBar(
|
||||
.padding(horizontal = 14.dp, vertical = 4.dp),
|
||||
verticalAlignment = Alignment.CenterVertically
|
||||
) {
|
||||
// Text field
|
||||
// Apple Emoji Text Field (с PNG эмодзи)
|
||||
Box(
|
||||
modifier = Modifier
|
||||
.weight(1f)
|
||||
.padding(top = 8.dp, bottom = 8.dp, end = 70.dp), // место для emoji + send
|
||||
contentAlignment = Alignment.CenterStart
|
||||
) {
|
||||
BasicTextField(
|
||||
AppleEmojiTextField(
|
||||
value = value,
|
||||
onValueChange = onValueChange,
|
||||
textStyle = androidx.compose.ui.text.TextStyle(
|
||||
color = textColor,
|
||||
fontSize = 16.sp
|
||||
),
|
||||
cursorBrush = SolidColor(PrimaryBlue),
|
||||
modifier = Modifier.fillMaxWidth(),
|
||||
maxLines = 5,
|
||||
decorationBox = { innerTextField ->
|
||||
Box(contentAlignment = Alignment.CenterStart) {
|
||||
if (value.isEmpty()) {
|
||||
Text(
|
||||
text = "Message",
|
||||
color = placeholderColor.copy(alpha = 0.6f),
|
||||
fontSize = 16.sp
|
||||
)
|
||||
}
|
||||
innerTextField()
|
||||
}
|
||||
}
|
||||
textColor = textColor,
|
||||
textSize = 16f,
|
||||
hint = "Message",
|
||||
hintColor = placeholderColor.copy(alpha = 0.6f),
|
||||
modifier = Modifier.fillMaxWidth()
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user