Browse SDKs · React Native
Platform
SDKsReact NativeEnterprise

Set conversation group order

Batch update sort order priorities for conversation groups using the OpenIM React Native SDK.

Copy

Batch reorder conversation groups for the current account:

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

Parameters

Accepts an array of order specification objects:

ParameterTypeRequiredDescription
conversationGroupIDstringYesTarget conversation group ID to reorder.
ordernumberYesNew numeric ordering priority value.

Return value

A resolved Promise confirms that the new sort order was saved on the server.

Ordering updates trigger the OnConversationGroupChanged event. In local state reconciliation, update the order property of each group identified by conversationGroupID and re-sort the conversation group list view. For event details, see Conversation groups overview.