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) {
topReaction.first
} 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
@@ -516,4 +517,4 @@ class MessagesAdapter @Inject constructor(
}
}
}
}
@@ -145,6 +145,7 @@
android:background="@drawable/message_only"
android:backgroundTint="?android:attr/colorBackground"
android:elevation="2dp"
android:maxLines="1"
android:paddingStart="8dp"
android:paddingTop="4dp"
android:paddingEnd="8dp"
@@ -176,4 +177,4 @@
</LinearLayout>
</FrameLayout>
</FrameLayout>
@@ -183,6 +183,7 @@
android:background="@drawable/message_only"
android:backgroundTint="?android:attr/colorBackground"
android:elevation="2dp"
android:maxLines="1"
android:paddingStart="8dp"
android:paddingTop="4dp"
android:paddingEnd="8dp"
@@ -250,4 +251,4 @@
</LinearLayout>
</FrameLayout>
</FrameLayout>