mirror of
https://github.com/nextcloud/talk-android.git
synced 2024-11-26 15:05:44 +03:00
fix more emojis ("...") color
Signed-off-by: Marcel Hibbe <dev@mhibbe.de>
This commit is contained in:
parent
31bb614bac
commit
b136465415
1 changed files with 7 additions and 8 deletions
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue