Browse SDKs · React Native
SDKsReact NativeEnterprise

Reorder conversation groups

Batch-update the sort values of conversation groups.

Copy

Call setConversationGroupOrder() to batch-update the sort values of conversation groups.

await OpenIMSDK.setConversationGroupOrder([
  { conversationGroupID: firstGroupID, order: 100 },
  { conversationGroupID: secondGroupID, order: 200 },
]);

Parameters

The method receives an array. Each item contains:

ParameterTypeRequiredDescription
conversationGroupIDstringYesGroup ID whose order should be updated.
ordernumberYesNew sort value. The application should use one consistent sort direction.

Return result

The call does not return group data. The UI can use the submitted values or obtain the latest groups from OnConversationGroupChanged or a new query. See Conversation group overview.