Commit c011e20c25f3aa1909ed70fad34a309530277adb
1 parent
4efc2c25
单聊获取历史消息数组逆向
Showing
1 changed file
with
4 additions
and
1 deletions
CNLiveChatSDKDemo/CNLiveChatSDKDemo/PrivateViewController.m
| @@ -213,7 +213,10 @@ static NSString *priCellId = @"priCellId"; | @@ -213,7 +213,10 @@ static NSString *priCellId = @"priCellId"; | ||
| 213 | model.portraitUri = message.userInfo.portraitUri; | 213 | model.portraitUri = message.userInfo.portraitUri; |
| 214 | model.type = message.conversationType; | 214 | model.type = message.conversationType; |
| 215 | 215 | ||
| 216 | - [_messageArrayM addObject:model]; | 216 | + if (![_messageArrayM containsObject:model]) { |
| 217 | + | ||
| 218 | + [_messageArrayM insertObject:model atIndex:0]; | ||
| 219 | + } | ||
| 217 | 220 | ||
| 218 | [self.tableView reloadData]; | 221 | [self.tableView reloadData]; |
| 219 | 222 |