@@ -37,6 +37,8 @@ NS_ASSUME_NONNULL_BEGIN
@property (nonatomic, assign) BOOL messageType;
+@property (nonatomic, assign) BOOL isTeacher;
+
@end
NS_ASSUME_NONNULL_END
@@ -65,7 +65,8 @@
}
- (BOOL)tableView:(UITableView *)tableView canEditRowAtIndexPath:(NSIndexPath *)indexPath {
- return YES;
+ SLChatListModel *chatModel = [self.viewModels objectAtIndex:indexPath.row];
+ return !chatModel.isTeacher;
- (void)tableView:(UITableView *)tableView commitEditingStyle:(UITableViewCellEditingStyle)editingStyle forRowAtIndexPath:(NSIndexPath *)indexPath {