问题描述
我在文字消息里面添加了阅后即焚message.messageType = eMessageTypeChat; message.ext = @{@"fire":@YES};在- (void)didReceiveHasReadResponse:(EMReceipt *)receipt这个方法里面进行判断,代码如下 self.conversation = [[EaseMob sharedInstance].chatManager conversationForChatter:receipt.conversationChatter conversationType:eConversationTypeChat]; EMMessage *message = [self.conversation loadMessageWithId:receipt.chatId]; if ([message.ext[@"fire"] boolValue]) { //如果是阅后即焚消息,删除本地并更新UI [self.conversation removeMessage:message]; [self.conversation removeMessageWithId:message.messageId]; self.dataArray = [[self formatMessages:self.messsagesSource] mutableCopy]; [self.tableView reloadData]; }现在遇到的问题是判断是阅后即焚的消息后,删除会话里面的message,tableview reload并没有把该条消息删掉,关掉对话框从新进来,该条消息被删除了
解决方案
数据源做了删除吗?