mirror of
https://github.com/nextcloud/talk-android
synced 2025-06-20 03:59:35 +01:00
fix more emojis ("...") color
Signed-off-by: Marcel Hibbe <dev@mhibbe.de>
This commit is contained in:
parent
31bb614bac
commit
b136465415
@ -50,6 +50,11 @@ class Reaction {
|
|||||||
var remainingEmojisToDisplay = MAX_EMOJIS_TO_DISPLAY
|
var remainingEmojisToDisplay = MAX_EMOJIS_TO_DISPLAY
|
||||||
val showInfoAboutMoreEmojis = message.reactions.size > 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(
|
val amountParams = LinearLayout.LayoutParams(
|
||||||
ViewGroup.LayoutParams.WRAP_CONTENT,
|
ViewGroup.LayoutParams.WRAP_CONTENT,
|
||||||
ViewGroup.LayoutParams.WRAP_CONTENT
|
ViewGroup.LayoutParams.WRAP_CONTENT
|
||||||
@ -81,13 +86,7 @@ class Reaction {
|
|||||||
|
|
||||||
if (amount > 1) {
|
if (amount > 1) {
|
||||||
val reactionAmount = TextView(context)
|
val reactionAmount = TextView(context)
|
||||||
if (isOutgoingMessage) {
|
reactionAmount.setTextColor(textColor)
|
||||||
reactionAmount.setTextColor(ContextCompat.getColor(context, R.color.white))
|
|
||||||
} else {
|
|
||||||
reactionAmount.setTextColor(
|
|
||||||
ContextCompat.getColor(binding.root.context, R.color.high_emphasis_text)
|
|
||||||
)
|
|
||||||
}
|
|
||||||
reactionAmount.text = amount.toString()
|
reactionAmount.text = amount.toString()
|
||||||
reactionAmount.layoutParams = amountParams
|
reactionAmount.layoutParams = amountParams
|
||||||
emojiWithAmountWrapper.addView(reactionAmount)
|
emojiWithAmountWrapper.addView(reactionAmount)
|
||||||
@ -103,7 +102,7 @@ class Reaction {
|
|||||||
remainingEmojisToDisplay--
|
remainingEmojisToDisplay--
|
||||||
if (remainingEmojisToDisplay == 0 && showInfoAboutMoreEmojis) {
|
if (remainingEmojisToDisplay == 0 && showInfoAboutMoreEmojis) {
|
||||||
val infoAboutMoreEmojis = TextView(context)
|
val infoAboutMoreEmojis = TextView(context)
|
||||||
infoAboutMoreEmojis.setTextColor(ContextCompat.getColor(context, R.color.textColorMaxContrast))
|
infoAboutMoreEmojis.setTextColor(textColor)
|
||||||
infoAboutMoreEmojis.text = EMOJI_MORE
|
infoAboutMoreEmojis.text = EMOJI_MORE
|
||||||
binding.reactionsEmojiWrapper.addView(infoAboutMoreEmojis)
|
binding.reactionsEmojiWrapper.addView(infoAboutMoreEmojis)
|
||||||
break
|
break
|
||||||
|
Loading…
Reference in New Issue
Block a user