fix message highlighting. Fixes #1077

This commit is contained in:
Phillip Thelen 2019-04-24 13:45:50 +02:00
parent c439a07566
commit 42432d369d

View file

@ -231,7 +231,7 @@ class ChatRecyclerViewAdapter(data: OrderedRealmCollection<ChatMessage>?, autoUp
}
val username = user?.formattedUsername
messageWrapper.background = if ((name != null && msg.text?.contains(name) == true) || (username != null && msg.text?.contains(username) == true)) {
messageWrapper.background = if ((name != null && msg.text?.contains("@$name") == true) || (username != null && msg.text?.contains(username) == true)) {
ContextCompat.getDrawable(context, R.drawable.layout_rounded_bg_brand_700)
} else {
ContextCompat.getDrawable(context, R.drawable.layout_rounded_bg)