use proper context to be day/night aware

Signed-off-by: Andy Scherzinger <info@andy-scherzinger.de>
This commit is contained in:
Andy Scherzinger 2022-04-21 09:43:40 +02:00 committed by Marcel Hibbe
parent fd98ccc816
commit 583b52588c
No known key found for this signature in database
GPG key ID: C793F8B59F43CE7B
2 changed files with 7 additions and 3 deletions

View file

@ -259,7 +259,7 @@ public abstract class MagicPreviewMessageViewHolder extends MessageHolders.Incom
itemView.setTag(REPLYABLE_VIEW_TAG, message.isReplyable()); itemView.setTag(REPLYABLE_VIEW_TAG, message.isReplyable());
reactionsBinding = getReactionsBinding(); reactionsBinding = getReactionsBinding();
new Reaction().showReactions(message, reactionsBinding, context, true); new Reaction().showReactions(message, reactionsBinding, getMessageText().getContext(), true);
reactionsBinding.reactionsEmojiWrapper.setOnClickListener(l -> { reactionsBinding.reactionsEmojiWrapper.setOnClickListener(l -> {
reactionsInterface.onClickReactions(message); reactionsInterface.onClickReactions(message);
}); });

View file

@ -72,13 +72,17 @@ class Reaction {
reactionAmount.setTextColor(ContextCompat.getColor(context, R.color.white)) reactionAmount.setTextColor(ContextCompat.getColor(context, R.color.white))
} else { } else {
// reactionAmount.setTextColor(ContextCompat.getColor(context, R.color.nc_message_incoming_reaction_text_color)) // reactionAmount.setTextColor(ContextCompat.getColor(context, R.color.nc_message_incoming_reaction_text_color))
/*
reactionAmount.setTextColor( reactionAmount.setTextColor(
ResourcesCompat.getColor( ResourcesCompat.getColor(
context.applicationContext.resources, context.resources,
R.color.nc_message_incoming_reaction_text_color, R.color.high_emphasis_text,
null null
) )
) )
*/
reactionAmount.setTextColor(ContextCompat.getColor(binding.root.context, R.color
.high_emphasis_text))
} }
reactionAmount.text = amount.toString() reactionAmount.text = amount.toString()
emojiWithAmountWrapper.addView(reactionAmount) emojiWithAmountWrapper.addView(reactionAmount)