feat: Replace Text with AppleEmojiText for better emoji handling in message input and reply bubbles
This commit is contained in:
@@ -1037,12 +1037,13 @@ fun ReplyBubble(
|
||||
else -> "..."
|
||||
}
|
||||
|
||||
Text(
|
||||
AppleEmojiText(
|
||||
text = displayText,
|
||||
color = replyTextColor,
|
||||
fontSize = 14.sp,
|
||||
maxLines = 1,
|
||||
overflow = TextOverflow.Ellipsis
|
||||
overflow = android.text.TextUtils.TruncateAt.END,
|
||||
enableLinks = false
|
||||
)
|
||||
}
|
||||
|
||||
|
||||
@@ -36,6 +36,7 @@ import app.rosette.android.ui.keyboard.KeyboardTransitionCoordinator
|
||||
import coil.compose.AsyncImage
|
||||
import coil.request.ImageRequest
|
||||
import com.rosetta.messenger.network.AttachmentType
|
||||
import com.rosetta.messenger.ui.components.AppleEmojiText
|
||||
import com.rosetta.messenger.ui.components.AppleEmojiTextField
|
||||
import com.rosetta.messenger.ui.components.OptimizedEmojiPicker
|
||||
import com.rosetta.messenger.ui.onboarding.PrimaryBlue
|
||||
@@ -331,7 +332,7 @@ fun MessageInputBar(
|
||||
val hasImageAttachment = msg.attachments.any {
|
||||
it.type == AttachmentType.IMAGE
|
||||
}
|
||||
Text(
|
||||
AppleEmojiText(
|
||||
text = if (displayReplyMessages.size == 1) {
|
||||
if (msg.text.isEmpty() && hasImageAttachment) {
|
||||
"Photo"
|
||||
@@ -344,7 +345,8 @@ fun MessageInputBar(
|
||||
color = if (isDarkTheme) Color.White.copy(alpha = 0.6f)
|
||||
else Color.Black.copy(alpha = 0.5f),
|
||||
maxLines = 1,
|
||||
overflow = TextOverflow.Ellipsis
|
||||
overflow = android.text.TextUtils.TruncateAt.END,
|
||||
enableLinks = false
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user