set proper colors for unread-messages for edge case of theme switch

Signed-off-by: Andy Scherzinger <info@andy-scherzinger.de>
This commit is contained in:
Andy Scherzinger 2021-05-11 15:35:28 +02:00 committed by Marcel Hibbe
parent 2b44a295a4
commit dc78f615cb
No known key found for this signature in database
GPG Key ID: C793F8B59F43CE7B

View File

@ -23,6 +23,7 @@
package com.nextcloud.talk.adapters.items;
import android.content.Context;
import android.content.res.ColorStateList;
import android.graphics.Color;
import android.graphics.Typeface;
import android.graphics.drawable.BitmapDrawable;
@ -146,7 +147,8 @@ public class ConversationItem extends AbstractFlexibleItem<ConversationItem.Conv
holder.dialogUnreadBubble.setChipBackgroundColorResource(R.color.colorPrimary);
holder.dialogUnreadBubble.setTextColor(Color.WHITE);
} else {
holder.dialogUnreadBubble.setChipBackgroundColorResource(R.color.conversation_unread_bubble);
holder.dialogUnreadBubble.setChipBackgroundColor(
ColorStateList.valueOf(ContextCompat.getColor(context, R.color.conversation_unread_bubble)));
holder.dialogUnreadBubble.setTextColor(
ContextCompat.getColor(context, R.color.conversation_unread_bubble_text));
}