Skip to content

Commit 0b30dc1

Browse files
Android UI Kit Sample v2.4.0-1
1 parent 44fcf83 commit 0b30dc1

File tree

1 file changed

+16
-6
lines changed

1 file changed

+16
-6
lines changed

uikit/src/main/java/com/cometchat/pro/uikit/ui_components/shared/cometchatConversations/CometChatConversationsAdapter.java

Lines changed: 16 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -319,12 +319,22 @@ public void setDeliveredReceipts(MessageReceipt deliveryReceipts){
319319

320320
public void setTypingIndicator(TypingIndicator typingIndicator, boolean b) {
321321
for(Conversation conversation : filterConversationList) {
322-
if (conversation.getConversationId()
323-
.contains(typingIndicator.getReceiverId())) {
324-
this.typingIndicator = typingIndicator;
325-
isTypingVisible = b;
326-
int index= filterConversationList.indexOf(conversation);
327-
notifyItemChanged(index);
322+
if (typingIndicator.getReceiverType().equalsIgnoreCase(CometChatConstants.RECEIVER_TYPE_USER)) {
323+
if (conversation.getConversationId()
324+
.contains(typingIndicator.getSender().getUid())) {
325+
this.typingIndicator = typingIndicator;
326+
isTypingVisible = b;
327+
int index = filterConversationList.indexOf(conversation);
328+
notifyItemChanged(index);
329+
}
330+
} else {
331+
if (conversation.getConversationId()
332+
.contains(typingIndicator.getReceiverId())) {
333+
this.typingIndicator = typingIndicator;
334+
isTypingVisible = b;
335+
int index = filterConversationList.indexOf(conversation);
336+
notifyItemChanged(index);
337+
}
328338
}
329339
}
330340
}

0 commit comments

Comments
 (0)