fix emoji count wrapping

This commit is contained in:
Ben Iofel
2025-09-13 17:21:16 -04:00
parent fb28453b39
commit ed63d27511
3 changed files with 7 additions and 4 deletions
@@ -411,7 +411,8 @@ class MessagesAdapter @Inject constructor(
val reactionText = if (topReaction.second == 1) { val reactionText = if (topReaction.second == 1) {
topReaction.first topReaction.first
} else { } else {
"${topReaction.first} ${topReaction.second}" // Use a non-breaking space to keep the emoji and count together
"${topReaction.first}\u00A0${topReaction.second}"
} }
holder.reactionText?.text = reactionText holder.reactionText?.text = reactionText
@@ -145,6 +145,7 @@
android:background="@drawable/message_only" android:background="@drawable/message_only"
android:backgroundTint="?android:attr/colorBackground" android:backgroundTint="?android:attr/colorBackground"
android:elevation="2dp" android:elevation="2dp"
android:maxLines="1"
android:paddingStart="8dp" android:paddingStart="8dp"
android:paddingTop="4dp" android:paddingTop="4dp"
android:paddingEnd="8dp" android:paddingEnd="8dp"
@@ -183,6 +183,7 @@
android:background="@drawable/message_only" android:background="@drawable/message_only"
android:backgroundTint="?android:attr/colorBackground" android:backgroundTint="?android:attr/colorBackground"
android:elevation="2dp" android:elevation="2dp"
android:maxLines="1"
android:paddingStart="8dp" android:paddingStart="8dp"
android:paddingTop="4dp" android:paddingTop="4dp"
android:paddingEnd="8dp" android:paddingEnd="8dp"