- Android
- iOS
- JavaScript
- 鸿蒙
参数说明
名称 | 类型 | 描述 | 版本 |
---|---|---|---|
count | int | 拉取数量 | 1.0.0 |
timestamp | long | 时间戳,以毫秒为单位,0 表示当前时间 | 1.0.0 |
direction | JIMConst.PullDirection | 拉取方向 | 1.0.0 |
示例代码
List<ConversationInfo> list = JIM.getInstance().getConversationManager().getTopConversationInfoList(100, 0, JIMConst.PullDirection.OLDER);
参数说明
名称 | 类型 | 描述 | 版本 |
---|---|---|---|
count | int | 拉取数量 | 1.0.0 |
timestamp | long long | 时间戳,以毫秒为单位,0 表示当前时间 | 1.0.0 |
direction | JPullDirection | 拉取方向 | 1.0.0 |
示例代码
NSArray <JConversationInfo *> *conversationList = [JIM.shared.conversationManager getTopConversationInfoListByCount:100 timestamp:0 direction:JPullDirectionOlder];
回调说明
属性 | 类型 | 描述 | 版本 |
---|---|---|---|
result | Object | 查询结果 | 1.0.0 |
result.conversations | Array | 会话数组,单个会话对象结构请查看 Conversation | 1.0.0 |
result.isFinished | Boolean | 标志会话是否获取完成 | 1.0.0 |
示例代码
jim.getTopConversations().then((result) => {
let { conversations, isFinished } = result;
console.log(isFinished, conversations);
})
参数说明
名称 | 类型 | 描述 | 版本 |
---|---|---|---|
sortType | TopConverSortType | 枚举值。ByTopTime:按置顶时间排序;BySortTime:按会话时间排序 | 1.0.0 |
start | number | 起始时间戳,以毫秒为单位,0 表示当前时间 | 1.0.0 |
isPositive | boolean | 是否正向拉取 | 1.0.0 |
示例代码
JuggleIm.instance.getConversationManager().getTopConversations(TopConverSortType.ByTopTime,0,true,(convers)=>{
})