差别

这里会显示出您选择的修订版和当前版本之间的差别。

到此差别页面的链接

两侧同时换到之前的修订记录 前一修订版
后一修订版 两侧同时换到之后的修订记录
im:ios:basics:message [2020/07/27 04:42]
huanxinfudh [获取单个会话未读消息数]
im:ios:basics:message [2020/07/27 04:44]
huanxinfudh [获取单个会话未读消息数]
行 496: 行 496:
                    ​createIfNotExist:​(BOOL)aIfCreate;​                    ​createIfNotExist:​(BOOL)aIfCreate;​
                                        
 +// 获取单聊会话的未读消息数 ​                  
 EMConversation *conversation = [[EMClient sharedClient].chatManager getConversation:​@"​8001"​ type:​EMConversationTypeChat createIfNotExist:​YES];​ EMConversation *conversation = [[EMClient sharedClient].chatManager getConversation:​@"​8001"​ type:​EMConversationTypeChat createIfNotExist:​YES];​
 +[conversation unreadMessagesCount];​
 +
 +// 获取群聊会话的未读消息数 ​                  
 +EMConversation *conversation = [[EMClient sharedClient].chatManager getConversation:​@"​121828583195137"​ type:​EMConversationTypeGroupChat createIfNotExist:​YES];​
 [conversation unreadMessagesCount];​ [conversation unreadMessagesCount];​
 </​code>​ </​code>​