MessageHeader
is a Component that showcases the User or Group details in the toolbar. Furthermore, it also presents a typing indicator and a back navigation button for ease of use.
MessageHeader
is comprised of the following components:
Component | Description |
---|---|
CometChatListItem | This component’s view consists of avatar, status indicator , title, and subtitle. The fields are then mapped with the SDK’s user, group class. |
Back Button | BackButton that allows users to navigate back from the current activity or screen to the previous one. |
OnBack
is triggered when you click on the back button of the Message Header component. You can override this action using the following code snippet.
Example
In this example, we are employing the onBack
action.
onError
action.
onSearchOptionClicked
event is triggered when the user clicks the search option. It does not have a default behavior. However, you can override its behavior using the following code snippet.
OnItemClick
is triggered when you click on a ListItem of the CometChatMessageHeader
component. The OnItemClick
action doesn’t have a predefined behavior. You can override this action using the following code snippet.
Component
. You can filter the list based on your specific criteria, allowing for a more customized. Filters can be applied using RequestBuilders
of Chat SDK.
The MessageHeader
component does not have any exposed filters.
Component
. By using event you can extend existing functionality. Being global events, they can be applied in Multiple Locations and are capable of being Added or Removed.
The MessageHeader
component does not produce any events.
CometChatMessageHeader
Example
Property | Description | Code |
---|---|---|
Show Back Button | Shows the back button. | showBackButton={true} |
Hide Video Call Button | Hides the video call button. | hideVideoCallButton={true} |
Hide Voice Call Button | Hides the voice call button. | hideVoiceCallButton={true} |
Show Conversation Summary Button | Shows the conversation summary button. | showConversationSummaryButton={true} |
Hide User Status | Hides the user’s online/offline status indicator. | hideUserStatus={true} |
Show Search Option | Shows the search option. | showSearchOption={true} |
User | A CometChat.User object representing the user whose information (e.g., status) is displayed. | user={chatUser} |
Group | A CometChat.Group object representing the group whose details (e.g., member count) are displayed. | group={chatGroup} |
Summary Generation Message Count | Number of messages for which the summary should be shown. | summaryGenerationMessageCount={1000} |
Disable Auto Summary Generation | Disables the auto generation of conversation summary. | disableAutoSummaryGeneration={true} |
lastActiveAtDateTimeFormat
property allows you to customize the last active timestamp displayed in the message header.
Default Date Time Format:
CalendarObject
.