SDKsuni-appEnterprise
Reorder conversation groups
OpenIM uni-app / uni-app x SDK guide for Reorder conversation groups.
setConversationGroupOrder() Commercial submits group IDs with their new sort values in one batch.
Parameters
conversationGroupOrders is a non-empty array. Every item contains:
| Parameter | Type | Required | Description |
|---|---|---|---|
conversationGroupID | string | Yes | Group to reorder. |
order | number | Yes | New sort value. Avoid duplicate values or unstable ordering rules in one batch. |
import { setConversationGroupOrder } from '@/uni_modules/unix-openim-sdk'
await setConversationGroupOrder({
conversationGroupOrders: [
{ conversationGroupID: 'group_a', order: 100 },
{ conversationGroupID: 'group_b', order: 200 },
],
})Submit the complete affected set once when dragging ends rather than issuing one request per movement. Deduplicate by conversationGroupID and calculate all affected values with a stable algorithm.
Return result
The Promise resolves directly to a string result, meaning the reorder request completed. Requery groups or await the group-change event to confirm final ordering. If several clients edit concurrently, use the final server order rather than retaining only the local drag order.
Was this page helpful?