diff --git a/xplan-ios/Main/Message/View/SessionList/SessionListViewController.m b/xplan-ios/Main/Message/View/SessionList/SessionListViewController.m index e8d5ffe4..7f19edc6 100644 --- a/xplan-ios/Main/Message/View/SessionList/SessionListViewController.m +++ b/xplan-ios/Main/Message/View/SessionList/SessionListViewController.m @@ -239,7 +239,9 @@ NSString * const kMessageShowReadDotKey = @"kMessageShowReadDotKey"; - (NSArray *)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];