消息模块-去掉置顶的功能吧

This commit is contained in:
fengshuo
2022-04-26 17:11:59 +08:00
parent 0c97ee0f28
commit 3fb4a224bd

View File

@@ -138,25 +138,13 @@
}
- (NSArray<UITableViewRowAction *> *)tableView:(UITableView *)tableView editActionsForRowAtIndexPath:(NSIndexPath *)indexPath {
UITableViewRowAction * topAction = [UITableViewRowAction rowActionWithStyle:UITableViewRowActionStyleDefault title:@"置顶" handler:^(UITableViewRowAction * _Nonnull action, NSIndexPath * _Nonnull indexPath) {
NIMRecentSession * session = [self.recentSessions objectAtIndex:indexPath.row];
NIMAddStickTopSessionParams *params = [[NIMAddStickTopSessionParams alloc] initWithSession:session.session];
[[[NIMSDK sharedSDK] chatExtendManager] addStickTopSession:params completion:^(NSError * _Nullable error, NIMStickTopSessionInfo * _Nullable newInfo) {
if (error == nil) {
}
}];
}];
topAction.title = @"置顶";
topAction.backgroundColor = [UIColor greenColor];
UITableViewRowAction * deleteAction = [UITableViewRowAction rowActionWithStyle:UITableViewRowActionStyleDefault title:@"置顶" handler:^(UITableViewRowAction * _Nonnull action, NSIndexPath * _Nonnull indexPath) {
NIMRecentSession * session = [self.recentSessions objectAtIndex:indexPath.row];
[[NIMSDK sharedSDK].conversationManager deleteRecentSession:session];
}];
deleteAction.title = @"删除";
deleteAction.backgroundColor = [UIColor redColor];
return @[topAction, deleteAction];
return @[deleteAction];
}
#pragma mark - UITableViewDataSource