会话列表和好友列表都是借鉴Leanchat的,跟Demo里的代码一样,但就是每次都只能获取一条数据。adapter里的dataList.size() = 1.
这到底是怎么回事?
如下面的chatList,怎么调试都只有一条数据
private void updateChatList() {
List chatIdList = LCIMConversationItemCache.getInstance().getSortedConversationList();
List chatList = new ArrayList<>();
for(String chatId : chatIdList) {
chatList.add(LCChatKit.getInstance().getClient().getConversation(chatId));
}
chatListAdapter.setDataList(chatList);
chatListAdapter.notifyDataSetChanged();
}