修复了删除最近回话删除聊天记录的问题
This commit is contained in:
@@ -239,7 +239,9 @@ NSString * const kMessageShowReadDotKey = @"kMessageShowReadDotKey";
|
||||
- (NSArray<UITableViewRowAction *> *)tableView:(UITableView *)tableView editActionsForRowAtIndexPath:(NSIndexPath *)indexPath {
|
||||
UITableViewRowAction * deleteAction = [UITableViewRowAction rowActionWithStyle:UITableViewRowActionStyleDefault title:@"置顶" handler:^(UITableViewRowAction * _Nonnull action, NSIndexPath * _Nonnull indexPath) {
|
||||
NIMRecentSession * session = [self.recentSessions safeObjectAtIndex1:indexPath.row];
|
||||
[[NIMSDK sharedSDK].conversationManager deleteRecentSession:session];
|
||||
NIMDeleteMessagesOption * opt = [[NIMDeleteMessagesOption alloc] init];
|
||||
opt.removeSession = YES;
|
||||
[[NIMSDK sharedSDK].conversationManager deleteAllmessagesInSession:session.session option:opt];
|
||||
}];
|
||||
deleteAction.title = @"删除";
|
||||
deleteAction.backgroundColor = [UIColor redColor];
|
||||
|
Reference in New Issue
Block a user