Reorder conversation groups
Batch update the display sort order indices for multiple conversation groups.
Reordering conversation groups is a Commercial Edition capability. Batch update group display sequences by supplying an array of group identifiers paired with their corresponding sort order values.
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
conversationGroupOrders | OpenIMConversationGroupOrderItem[] | Yes | Array of group ordering objects. |
conversationGroupOrders[].conversationGroupID | string | Yes | Identifier of the conversation group to position. |
conversationGroupOrders[].order | number | Yes | Sequence sorting index value. |
Code example
import { setConversationGroupOrder } from '@/uni_modules/unix-openim-sdk'
await setConversationGroupOrder({
conversationGroupOrders: [
{ conversationGroupID: firstGroupID, order: 100 },
{ conversationGroupID: secondGroupID, order: 200 },
],
})The sorting direction (ascending or descending) is established by application UI conventions.
Return value
The Promise resolves with void upon successful completion.
State changes after the call
Promise resolution indicates that the updated order indices were applied. Immediately re-sort your local group tabs using the new order values indexed by conversationGroupID. When group change events arrive, re-query the group list to calibrate order as documented in Conversation group overview.
Was this page helpful?