diff --git a/app/src/main/java/com/nextcloud/talk/adapters/items/MentionAutocompleteItem.java b/app/src/main/java/com/nextcloud/talk/adapters/items/MentionAutocompleteItem.java index b85873168..b0f5f0e55 100644 --- a/app/src/main/java/com/nextcloud/talk/adapters/items/MentionAutocompleteItem.java +++ b/app/src/main/java/com/nextcloud/talk/adapters/items/MentionAutocompleteItem.java @@ -58,6 +58,8 @@ public class MentionAutocompleteItem extends AbstractFlexibleItem= Build.VERSION_CODES.O) { ImageViewExtensionsKt.loadAvatar( holder.binding.avatarView, diff --git a/app/src/main/java/com/nextcloud/talk/adapters/messages/IncomingTextMessageViewHolder.kt b/app/src/main/java/com/nextcloud/talk/adapters/messages/IncomingTextMessageViewHolder.kt index 99d84a9b3..5c8c73dbe 100644 --- a/app/src/main/java/com/nextcloud/talk/adapters/messages/IncomingTextMessageViewHolder.kt +++ b/app/src/main/java/com/nextcloud/talk/adapters/messages/IncomingTextMessageViewHolder.kt @@ -226,7 +226,7 @@ class IncomingTextMessageViewHolder(itemView: View, payload: Any) : MessageHolde val individualHashMap = message.messageParameters!![key] if (individualHashMap != null) { when (individualHashMap["type"]) { - "user", "guest", "call" -> { + "user", "guest", "call", "user-group" -> { val chip = if (individualHashMap["id"] == message.activeUser!!.userId) { R.xml.chip_you } else { diff --git a/app/src/main/java/com/nextcloud/talk/adapters/messages/OutcomingTextMessageViewHolder.kt b/app/src/main/java/com/nextcloud/talk/adapters/messages/OutcomingTextMessageViewHolder.kt index 6e4826228..f4525fbce 100644 --- a/app/src/main/java/com/nextcloud/talk/adapters/messages/OutcomingTextMessageViewHolder.kt +++ b/app/src/main/java/com/nextcloud/talk/adapters/messages/OutcomingTextMessageViewHolder.kt @@ -190,7 +190,7 @@ class OutcomingTextMessageViewHolder(itemView: View) : OutcomingTextMessageViewH val individualHashMap: HashMap? = message.messageParameters!![key] if (individualHashMap != null) { when (individualHashMap["type"]) { - "user", "guest", "call" -> { + "user", "guest", "call", "user-group" -> { val chip = if (individualHashMap["id"] == message.activeUser!!.userId) { R.xml.chip_you } else { diff --git a/app/src/main/java/com/nextcloud/talk/chat/ChatActivity.kt b/app/src/main/java/com/nextcloud/talk/chat/ChatActivity.kt index 50e887cfe..a0c3bf48a 100644 --- a/app/src/main/java/com/nextcloud/talk/chat/ChatActivity.kt +++ b/app/src/main/java/com/nextcloud/talk/chat/ChatActivity.kt @@ -2188,7 +2188,10 @@ class ChatActivity : for (i in mentionSpans.indices) { mentionSpan = mentionSpans[i] var mentionId = mentionSpan.id - if (mentionId.contains(" ") || mentionId.startsWith("guest/")) { + if (mentionId.contains(" ") || + mentionId.startsWith("guest/") || + mentionId.startsWith("group/") + ) { mentionId = "\"" + mentionId + "\"" } editable.replace(editable.getSpanStart(mentionSpan), editable.getSpanEnd(mentionSpan), "@$mentionId") diff --git a/app/src/main/java/com/nextcloud/talk/utils/DisplayUtils.java b/app/src/main/java/com/nextcloud/talk/utils/DisplayUtils.java index 82dc31009..61beb5f1a 100644 --- a/app/src/main/java/com/nextcloud/talk/utils/DisplayUtils.java +++ b/app/src/main/java/com/nextcloud/talk/utils/DisplayUtils.java @@ -182,9 +182,10 @@ public class DisplayUtils { int drawable; - boolean isCall = "call".equals(type) || "calls".equals(type); + boolean isCallOrGroup = + "call".equals(type) || "calls".equals(type) || "groups".equals(type) || "user-group".equals(type); - if (!isCall) { + if (!isCallOrGroup) { if (chipResource == R.xml.chip_you) { drawable = R.drawable.mention_chip; } else { @@ -198,7 +199,7 @@ public class DisplayUtils { chip.setBounds(0, 0, chip.getIntrinsicWidth(), chip.getIntrinsicHeight()); - if (!isCall) { + if (!isCallOrGroup) { String url = ApiUtils.getUrlForAvatar(conversationUser.getBaseUrl(), id, true); if ("guests".equals(type) || "guest".equals(type)) { url = ApiUtils.getUrlForGuestAvatar(