- Android
- iOS
- JavaScript
- Flutter
- ReactNative
- HarmonyOS
Parameters
| Name | Type | Description | Version |
|---|---|---|---|
| count | int | Number of items to retrieve | 1.0.0 |
| timestamp | long | Timestamp in milliseconds. 0 indicates the current time. | 1.0.0 |
| direction | JIMConst.PullDirection | Retrieval direction | 1.0.0 |
Code Example
List<ConversationInfo> list = JIM.getInstance().getConversationManager().getTopConversationInfoList(100, 0, JIMConst.PullDirection.OLDER);
Parameters
| Name | Type | Description | Version |
|---|---|---|---|
| count | int | Number of items to retrieve | 1.0.0 |
| timestamp | long long | Timestamp in milliseconds. 0 indicates the current time. | 1.0.0 |
| direction | JPullDirection | Retrieval direction | 1.0.0 |
Code Example
NSArray <JConversationInfo *> *conversationList = [JIM.shared.conversationManager getTopConversationInfoListByCount:100 timestamp:0 direction:JPullDirectionOlder];
Callback Parameters
| Property | Type | Description | Version |
|---|---|---|---|
| result | Object | Query result | 1.0.0 |
| result.conversations | Array | Conversation array. See Conversation for the structure of each conversation object. | 1.0.0 |
| result.isFinished | Boolean | Whether retrieval is complete | 1.0.0 |
Code Example
jim.getTopConversations().then((result) => {
let { conversations, isFinished } = result;
console.log(isFinished, conversations);
})
Parameters
| Name | Type | Description | Version |
|---|---|---|---|
| sortType | TopConverSortType | Enum value. ByTopTime sorts by pin time; BySortTime sorts by conversation time. | 1.0.0 |
| start | number | Start timestamp in milliseconds. 0 indicates the current time. | 1.0.0 |
| isPositive | boolean | Whether to retrieve in the forward direction | 1.0.0 |
Code Example
JuggleIm.instance.getConversationManager().getTopConversations(TopConverSortType.ByTopTime,0,true,(convers)=>{
})
Not supported.
Get the pinned conversation list.
Parameters
| Name | Type | Required | Default | Description | Version |
|---|---|---|---|---|---|
| count | Number | No | 100 | Number of items to retrieve | 0.6.3 |
| timestamp | Number | No | 0 | Timestamp in milliseconds. 0 indicates the current time. | 0.6.3 |
| direction | Number | No | 1 | Retrieval direction: 0 retrieves conversations after timestamp; 1 retrieves conversations before timestamp. | 0.6.3 |
Code Example
import JuggleIM from 'juggleim-rnsdk';
const conversations = await JuggleIM.getTopConversationInfoList({
count: 100,
timestamp: 0,
direction: 1
});