Commit 5acc3eb0 by suolong

修复个别手机发信息崩溃的问题

parent 46a13879
......@@ -1482,11 +1482,15 @@
for (FUSChatDetailFrameModel *frameModel in self.chatDetailArr) {
if ([model.msgModel.messageID isEqualToString:frameModel.msgModel.messageID]) {
[frameModel fus_setValueWithModel:model];
frameModel.msgModel = model.msgModel;
NSInteger refreshIndex = [self.chatDetailArr indexOfObject:frameModel];
if (refreshIndex == NSNotFound) {
return;
}
// 直接替换对象,避免通过“模型->字典->模型”的中转导致图片消息在 YYModel 反序列化时崩溃
[self.chatDetailArr replaceObjectAtIndex:refreshIndex withObject:model];
[self fus_judgeMessageTimeIsNeedShowWithIsNewMessage:YES];
FUSIMChatDetailCell *cell = [self.tableView cellForRowAtIndexPath:[NSIndexPath indexPathForRow:[self.chatDetailArr indexOfObject:frameModel] inSection:0]];
[cell fus_setCellDetailContentWithModel:frameModel];
FUSIMChatDetailCell *cell = [self.tableView cellForRowAtIndexPath:[NSIndexPath indexPathForRow:refreshIndex inSection:0]];
[cell fus_setCellDetailContentWithModel:model];
return;
}
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment