// // EMConversationHelper.h // ChatDemo-UI3.0 // // Created by XieYajie on 2019/1/14. // Copyright © 2019 XieYajie. All rights reserved. // #import NS_ASSUME_NONNULL_BEGIN @interface EMConversationModel : NSObject @property (nonatomic, strong) EMConversation *emModel; @property (nonatomic, strong) NSString *name; - (instancetype)initWithEMModel:(EMConversation *)aModel; @end @protocol EMConversationsDelegate; @interface EMConversationHelper : NSObject - (void)addDelegate:(id)aDelegate; - (void)removeDelegate:(id)aDelegate; + (instancetype)shared; + (NSArray *)modelsFromEMConversations:(NSArray *)aConversations; + (EMConversationModel *)modelFromContact:(NSString *)aContact; + (EMConversationModel *)modelFromGroup:(EMGroup *)aGroup; + (EMConversationModel *)modelFromChatroom:(EMChatroom *)aChatroom; //调用该方法,会触发[EMConversationsDelegate didConversationUnreadCountToZero:] + (void)markAllAsRead:(EMConversationModel *)aConversationModel; //调用该方法,会触发[EMConversationsDelegate didResortConversationsLatestMessage] + (void)resortConversationsLatestMessage; @end @protocol EMConversationsDelegate @optional - (void)didConversationUnreadCountToZero:(EMConversationModel *)aConversation; - (void)didResortConversationsLatestMessage; @end NS_ASSUME_NONNULL_END