File tree 1 file changed +7
-4
lines changed
Coding_iOS/Controllers/NProjectViewController
1 file changed +7
-4
lines changed Original file line number Diff line number Diff line change @@ -149,7 +149,7 @@ - (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger
149
149
if (section == 0 || section == 2 ) {
150
150
row = 2 ;
151
151
}else if (section == 1 ){
152
- row = _myProject.is_public .boolValue ? 4 : 6 ;
152
+ row = _myProject.is_public .boolValue ? _myProject. current_user_role_id . integerValue <= 70 ? 3 : 4 : 6 ;
153
153
}
154
154
return row;
155
155
}
@@ -233,10 +233,13 @@ - (CGFloat)tableView:(UITableView *)tableView heightForRowAtIndexPath:(NSIndexPa
233
233
if (indexPath.section == 0 ) {
234
234
cellHeight = indexPath.row == 0 ? [ProjectInfoCell cellHeight ]: [ProjectDescriptionCell cellHeightWithObj: _myProject];
235
235
}else if (indexPath.section == 1 ){
236
- NSInteger codeNum = _myProject.is_public .boolValue ? 2 : 4 ;
237
- cellHeight = (indexPath.row == codeNum && !_myProject.is_public .boolValue && _myProject.current_user_role_id .integerValue <= 75 )? 0 : [NProjectItemCell cellHeight ];
236
+ if (!_myProject.is_public .boolValue && _myProject.current_user_role_id .integerValue <= 75 && indexPath.row == 4 ) {// 私有项目的受限成员,不能查看代码
237
+ cellHeight = 0 ;
238
+ }else {
239
+ cellHeight = [NProjectItemCell cellHeight ];
240
+ }
238
241
}else {
239
- cellHeight = (!_myProject.is_public .boolValue && _myProject.current_user_role_id .integerValue <= 75 )? 0 : [NProjectItemCell cellHeight ];
242
+ cellHeight = (!_myProject.is_public .boolValue && _myProject.current_user_role_id .integerValue <= 75 )? 0 : [NProjectItemCell cellHeight ];// 私有项目的受限成员,不能查看代码
240
243
}
241
244
return cellHeight;
242
245
}
You can’t perform that action at this time.
0 commit comments