docs icon indicating copy to clipboard operation
docs copied to clipboard

获取聊天室列表的默认方式

Open wujun4code opened this issue 7 years ago • 0 comments

js 和 android 不一样

tom.getQuery().equalTo('tr',true).find(function(conversations){
      var chatRoom = conversations[0];// 聊天室对象
}).catch(console.error);
AVIMConversationsQuery query = tom.getChatRoomQuery();
query.findInBackground(new AVIMConversationQueryCallback() {
    @Override
    public void done(List<AVIMConversation> conversations, AVIMException e) {
        if (null != e) {
        showToast(e.getMessage());
        } else {
        // get results.
        }
    }
});

我偏向于 java 的解决方案,这个比较接近用户的直觉。

wujun4code avatar Oct 09 '18 06:10 wujun4code