File tree Expand file tree Collapse file tree
Coding_iOS/Controllers/NProjectViewController Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -149,7 +149,7 @@ - (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger
149149 if (section == 0 || section == 2 ) {
150150 row = 2 ;
151151 }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 ;
153153 }
154154 return row;
155155}
@@ -233,10 +233,13 @@ - (CGFloat)tableView:(UITableView *)tableView heightForRowAtIndexPath:(NSIndexPa
233233 if (indexPath.section == 0 ) {
234234 cellHeight = indexPath.row == 0 ? [ProjectInfoCell cellHeight ]: [ProjectDescriptionCell cellHeightWithObj: _myProject];
235235 }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+ }
238241 }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 ];// 私有项目的受限成员,不能查看代码
240243 }
241244 return cellHeight;
242245}
You can’t perform that action at this time.
0 commit comments