|
@@ -49,13 +49,16 @@ class Reaction {
|
|
for ((emoji, amount) in message.reactions) {
|
|
for ((emoji, amount) in message.reactions) {
|
|
val reactionEmoji = EmojiTextView(context)
|
|
val reactionEmoji = EmojiTextView(context)
|
|
reactionEmoji.text = emoji
|
|
reactionEmoji.text = emoji
|
|
|
|
+ binding.reactionsEmojiWrapper.addView(reactionEmoji)
|
|
|
|
|
|
val reactionAmount = TextView(context)
|
|
val reactionAmount = TextView(context)
|
|
- if (useLightColorForText){
|
|
|
|
- reactionAmount.setTextColor(ContextCompat.getColor(context, R.color.nc_grey))
|
|
|
|
- }
|
|
|
|
|
|
|
|
- reactionAmount.text = amount.toString()
|
|
|
|
|
|
+ if (amount > 1) {
|
|
|
|
+ if (useLightColorForText) {
|
|
|
|
+ reactionAmount.setTextColor(ContextCompat.getColor(context, R.color.nc_grey))
|
|
|
|
+ }
|
|
|
|
+ reactionAmount.text = amount.toString()
|
|
|
|
+ }
|
|
|
|
|
|
val params = RelativeLayout.LayoutParams(
|
|
val params = RelativeLayout.LayoutParams(
|
|
ViewGroup.LayoutParams.WRAP_CONTENT,
|
|
ViewGroup.LayoutParams.WRAP_CONTENT,
|
|
@@ -68,10 +71,9 @@ class Reaction {
|
|
0
|
|
0
|
|
)
|
|
)
|
|
reactionAmount.layoutParams = params
|
|
reactionAmount.layoutParams = params
|
|
-
|
|
|
|
- binding.reactionsEmojiWrapper.addView(reactionEmoji)
|
|
|
|
binding.reactionsEmojiWrapper.addView(reactionAmount)
|
|
binding.reactionsEmojiWrapper.addView(reactionAmount)
|
|
|
|
|
|
|
|
+
|
|
remainingEmojisToDisplay--
|
|
remainingEmojisToDisplay--
|
|
if (remainingEmojisToDisplay == 0 && showInfoAboutMoreEmojis) {
|
|
if (remainingEmojisToDisplay == 0 && showInfoAboutMoreEmojis) {
|
|
val infoAboutMoreEmojis = TextView(context)
|
|
val infoAboutMoreEmojis = TextView(context)
|