useDMChannelLists
Introduction
The useDMChannelLists
hook is used to implement channel list for Dm chatrooms. You can use these to create your own custom UI for DM Channel lists. Its returns the follwing values.
Property | Type | Description | Optional |
---|---|---|---|
dmChatrooms | Chatroom[] | List of direct message chatrooms. | |
loadMoreDmChatrooms | boolean | Indicates if more DM chatrooms can be loaded. | |
conversationsData | Record<string, Conversation> | Mapping of conversation IDs to their details. | |
usersData | Record<string, Member> | Mapping of user IDs to their details. | |
getDMChatroomsList | ZeroArgVoidReturns | Fetches the list of DM chatrooms. | |
refreshDMChatrooms | OneArgVoidReturns | Refreshes a specific DM chatroom by ID. | |
markReadADMChatroom | OneArgVoidReturns | Marks a DM chatroom as read by ID. | |
selectNewChatroom | OneArgVoidReturns | Selects a new chatroom by ID. | |
currentSelectedChatroomId | number | ID of the currently selected chatroom. | ✔️ |
showDM | boolean | Indicates whether the DM chatrooms should be displayed. | |
showList | number | Represents the visible chatroom list state. |
Reference
For reference checkout this file