From 42432d369d2c20a992819c2ce251afe56e475872 Mon Sep 17 00:00:00 2001 From: Phillip Thelen Date: Wed, 24 Apr 2019 13:45:50 +0200 Subject: [PATCH] fix message highlighting. Fixes #1077 --- .../habitica/ui/adapter/social/ChatRecyclerViewAdapter.kt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Habitica/src/main/java/com/habitrpg/android/habitica/ui/adapter/social/ChatRecyclerViewAdapter.kt b/Habitica/src/main/java/com/habitrpg/android/habitica/ui/adapter/social/ChatRecyclerViewAdapter.kt index eabea63e8..6065f40c5 100644 --- a/Habitica/src/main/java/com/habitrpg/android/habitica/ui/adapter/social/ChatRecyclerViewAdapter.kt +++ b/Habitica/src/main/java/com/habitrpg/android/habitica/ui/adapter/social/ChatRecyclerViewAdapter.kt @@ -231,7 +231,7 @@ class ChatRecyclerViewAdapter(data: OrderedRealmCollection?, 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)