fix more emojis ("...") color

Signed-off-by: Marcel Hibbe <dev@mhibbe.de>
This commit is contained in:
Marcel Hibbe 2022-04-21 12:12:09 +02:00
parent 31bb614bac
commit b136465415
No known key found for this signature in database
GPG key ID: C793F8B59F43CE7B

View file

@ -50,6 +50,11 @@ class Reaction {
var remainingEmojisToDisplay = MAX_EMOJIS_TO_DISPLAY
val showInfoAboutMoreEmojis = message.reactions.size > MAX_EMOJIS_TO_DISPLAY
var textColor = ContextCompat.getColor(context, R.color.white)
if (!isOutgoingMessage) {
textColor = ContextCompat.getColor(binding.root.context, R.color.high_emphasis_text)
}
val amountParams = LinearLayout.LayoutParams(
ViewGroup.LayoutParams.WRAP_CONTENT,
ViewGroup.LayoutParams.WRAP_CONTENT
@ -81,13 +86,7 @@ class Reaction {
if (amount > 1) {
val reactionAmount = TextView(context)
if (isOutgoingMessage) {
reactionAmount.setTextColor(ContextCompat.getColor(context, R.color.white))
} else {
reactionAmount.setTextColor(
ContextCompat.getColor(binding.root.context, R.color.high_emphasis_text)
)
}
reactionAmount.setTextColor(textColor)
reactionAmount.text = amount.toString()
reactionAmount.layoutParams = amountParams
emojiWithAmountWrapper.addView(reactionAmount)
@ -103,7 +102,7 @@ class Reaction {
remainingEmojisToDisplay--
if (remainingEmojisToDisplay == 0 && showInfoAboutMoreEmojis) {
val infoAboutMoreEmojis = TextView(context)
infoAboutMoreEmojis.setTextColor(ContextCompat.getColor(context, R.color.textColorMaxContrast))
infoAboutMoreEmojis.setTextColor(textColor)
infoAboutMoreEmojis.text = EMOJI_MORE
binding.reactionsEmojiWrapper.addView(infoAboutMoreEmojis)
break