Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Binary file added images/mark-as-unread.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
13 changes: 13 additions & 0 deletions ui-kit/android/core-features.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,19 @@ CometChat's Read Receipts feature provides visibility into the message status, l
| [MessageList](/ui-kit/android/message-list) | [MessageList](/ui-kit/android/message-list) is a Component that renders different types of Message bubbles, Read Recept status is an integral part of all message bubbles, no matter the type, and provides real-time updates about the status of the message. |
| [MessageInformation](/ui-kit/android/component-styling#message-information) | [MessageInformation](/ui-kit/android/component-styling#message-information) component provides transparency into the status of each sent message, giving the sender insights into whether their message has been delivered and read. |

## Mark As Unread

Mark as Unread feature allows users to manually mark messages as unread, helping them keep track of important conversations they want to revisit later. When enabled, the message list can automatically start from the first unread message, making it easier to pick up where you left off.

<Frame>
<img src="/images/mark-as-unread.png" />
</Frame>

| Components | Functionality |
| ------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| [Message List](/ui-kit/android/message-list) | [Message List](/ui-kit/android/message-list) provides the "Mark as unread" option in message actions and supports starting from the first unread message when enabled. |
| [Conversations](/ui-kit/android/conversations) | [Conversations](/ui-kit/android/conversations) component listens to conversation updates and reflects the updated unread count in real-time. |

## Typing Indicator

The Typing Indicator feature in CometChat shows when a user is typing a response in real-time, fostering a more interactive and engaging chat environment. This feature enhances the real-time communication experience, making conversations feel more natural and fluid.
Expand Down
6 changes: 6 additions & 0 deletions ui-kit/android/events.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -128,6 +128,7 @@ CometChatGroupEvents.addGroupListener(LISTENERS_TAG, new CometChatGroupEvents()
The `ConversationEvents` component emits events when the logged-in user performs actions related to conversations. This allows for the UI to be updated accordingly. Below are the events emitted by the Conversation Component:

* `ccConversationDeleted`: Triggered when the logged-in user deletes a conversation.
* `ccUpdateConversation`: Triggered when there is an update in the conversation.

To listen to conversation events and handle them in your application, you can use the following code snippets:

Expand All @@ -139,6 +140,11 @@ CometChatConversationEvents.addListener("LISTENERS_TAG", new CometChatConversati
public void ccConversationDeleted(Conversation conversation) {
// Perform action when conversation is deleted
}

@Override
public void ccUpdateConversation(Conversation conversation) {
// Perform action when conversation is updated
}
});
```

Expand Down
40 changes: 35 additions & 5 deletions ui-kit/android/message-list.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -442,17 +442,20 @@ Below is a list of customizations along with corresponding code snippets
| **groupActionMessageVisibility** | used to toggle visibility for action message option | `.groupActionMessageVisibility(View.GONE);` |
| **enableConversationStarters** | Controls whether conversation starters are generated in new conversations | `.enableConversationStarters(true);` |
| **setEnableConversationSummary** | Controls whether conversation summaries are enabled for the conversation list. | `.setEnableConversationSummary(true);` |
| **setUnreadMessageThreshold** | Sets the threshold for unread messages, determining when a message is marked as unread. | .setUnreadMessageThreshold(10); |
| **setSwipeToReplyEnabled** | Controls whether the swipe-to-reply functionality is enabled or disabled for messages. | .setSwipeToReplyEnabled(true); |
| **setUnreadMessageThreshold** | Sets the threshold for unread messages, determining when a message is marked as unread. | `.setUnreadMessageThreshold(10);` |
| **setSwipeToReplyEnabled** | Controls whether the swipe-to-reply functionality is enabled or disabled for messages. | `.setSwipeToReplyEnabled(true);` |
| **enableSmartReplies** | Enables smart replies for quick responses | `.enableSmartReplies(true);` |
| **smartRepliesKeywords** | Defines specific keywords in an incoming message that will trigger Smart Replies. | `.setAISmartRepliesKeywords(Arrays.asList("hello", "hi", "how are you", "good morning", "good evening", "good night"));` |
| **smartRepliesDelayDuration** | Sets the delay time before Smart Replies are fetched and displayed after a message is received. | `.smartRepliesDelayDuration(5000);` |
| **setStartFromUnreadMessages** | Starts the message list from the first unread message. | `.setStartFromUnreadMessages(true);` |
| **setAiAssistantSuggestedMessagesVisibility** | used to toggle visibility for suggested messages in case of chats with AI Assistants | `.setAiAssistantSuggestedMessagesVisibility(View.GONE);` |
| **setAIAssistantEmptyStateVisibility** | used to toggle visibility for empty chat greeting view in case of chats with AI Assistants | `.setAIAssistantEmptyStateVisibility(View.GONE);` |
| **refreshStyle** | used to refresh the style of message list | `.refreshStyle();` |
| **generateConversationSummary** | Triggers the generation of a conversation summary by fetching it from the ViewModel. | .generateConversationSummary(); |
| **setReplyOptionVisibility** | Sets the visibility of the “Reply to Message” option in the message actions menu. | .setReplyOptionVisibility(View.VISIBLE); |
| **setFlagOptionVisibility** | Sets the visibility of the “Report” option in the message actions menu. | .setFlagOptionVisibility(View.VISIBLE); |
| **generateConversationSummary** | Triggers the generation of a conversation summary by fetching it from the ViewModel. | `.generateConversationSummary();` |
| **setReplyOptionVisibility** | Sets the visibility of the “Reply to Message” option in the message actions menu. | `.setReplyOptionVisibility(View.VISIBLE);` |
| **setFlagOptionVisibility** | Sets the visibility of the “Report” option in the message actions menu. | `.setFlagOptionVisibility(View.VISIBLE);` |
| **setFlagRemarkInputFieldVisibility** | Sets the visibility of the remark input field in flag message popup. | `.setFlagRemarkInputFieldVisibility(View.VISIBLE);` |
| **setMarkAsUnreadOptionVisibility** | Sets the visibility of the “Mark unread” option in the message actions menu. | `.setMarkAsUnreadOptionVisibility(View.VISIBLE);` |

***

Expand Down Expand Up @@ -669,6 +672,33 @@ messageList.setTimeFormat(SimpleDateFormat("hh:mm a",Locale.getDefault()))

***

#### setNewMessageIndicatorView

Customizes the unread message indicator view.

Use Cases:

* Set a custom view for the unread message indicator.

<Tabs>
<Tab title="Java">
```java
messageList.setNewMessageIndicatorView(customView);
```

</Tab>

<Tab title="Kotlin">
```kotlin
messageList.setNewMessageIndicatorView(customView)
```

</Tab>

</Tabs>

***

#### setLoadingView

Customizes the loading indicator when messages are being fetched.
Expand Down