注册

getAllConversations加载不出列表

我退出登录再登录时候,getAllConversations获取会话列表时候是空的,不知道为什么,有时候又能获取到。
sdk版本3.2.1,打印登录状态也是正常,是登录状态,可以输出用户名,但是就是列表出不来,不知道为什么
已邀请:
同样的问题。
重启app自动登录上就有消息列表。
 
估计是退出登录后 清空了内存里的列表。 但是重新登录后没有再db里读。
 
列表为空的时候 手动从DB读取一次就好了。 虽然已经被环信deprecated了。。 应该是个BUG
- (void)tableViewDidTriggerHeaderRefresh {
NSArray *conversations = [[EMClient sharedClient].chatManager getAllConversations];
if (conversations.count==0) {
conversations = [[EMClient sharedClient].chatManager loadAllConversationsFromDB];
}
...
}

要回复问题请先登录注册