消息模块-去掉置顶的功能吧
This commit is contained in:
@@ -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
|
||||
|
Reference in New Issue
Block a user