Skip to content

Commit

Permalink
Merge branch 'main' of https://github.com/easemob/easeui_ios into main
Browse files Browse the repository at this point in the history
  • Loading branch information
lixm1988 committed Jan 30, 2024
2 parents b64f430 + 1383dc5 commit 6c25047
Showing 1 changed file with 8 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -159,11 +159,12 @@ - (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(N
}

EaseConversationCell *cell = [EaseConversationCell tableView:tableView cellViewModel:_viewModel];
if (self.dataAry.count > indexPath.row) {
EaseConversationModel *model = self.dataAry[indexPath.row];

cell.model = model;
if (indexPath.row >= self.dataAry.count || self.dataAry.count <= 0) {
return cell;
}
EaseConversationModel *model = self.dataAry[indexPath.row];

cell.model = model;

return cell;
}
Expand Down Expand Up @@ -319,11 +320,12 @@ - (BOOL)tableView:(UITableView *)tableView canEditRowAtIndexPath:(NSIndexPath *)
}

- (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath {
if (indexPath.row >= self.dataAry.count || self.dataAry.count <= 0) {
return;
}
EaseConversationModel *model = [self.dataAry objectAtIndex:indexPath.row];
if (!model.isTop) {
[tableView deselectRowAtIndexPath:indexPath animated:YES];
} else {

}
[self removeAt:model];
if (self.delegate && [self.delegate respondsToSelector:@selector(easeTableView:didSelectRowAtIndexPath:)]) {
Expand Down

0 comments on commit 6c25047

Please sign in to comment.