@@ -108,6 +108,18 @@ - (void)refresh{
108108 [weakSelf refresh ];
109109 }];
110110 }];
111+
112+ // 推送过来的页面,可能 curProject 对象为空
113+ if (!_curProject) {
114+ _curProject = [Project new ];
115+ _curProject.owner_user_name = _curMRPR.des_owner_name ;
116+ _curProject.name = _curMRPR.des_project_name ;
117+ [[Coding_NetAPIManager sharedManager ] request_ProjectDetail_WithObj: _curProject andBlock: ^(id data, NSError *error) {
118+ if (data) {
119+ weakSelf.curProject = data;
120+ }
121+ }];
122+ }
111123}
112124
113125#pragma mark TableM Footer Header
@@ -206,10 +218,12 @@ - (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath
206218 if (indexPath.row == 0 ) {
207219 MRPRCommitsViewController *vc = [MRPRCommitsViewController new ];
208220 vc.curMRPR = _curMRPR;
221+ vc.curProject = _curProject;
209222 [self .navigationController pushViewController: vc animated: YES ];
210223 }else {
211224 MRPRFilesViewController *vc = [MRPRFilesViewController new ];
212225 vc.curMRPR = _curMRPR;
226+ vc.curProject = _curProject;
213227 [self .navigationController pushViewController: vc animated: YES ];
214228 }
215229 }else if (_curMRPRInfo.discussions .count > 0 && indexPath.section == 2 ){// Comment
@@ -225,6 +239,7 @@ - (void)goToAddCommentVCToUser:(NSString *)userName{
225239 DebugLog (@" %@ " , userName);
226240 AddMDCommentViewController *vc = [AddMDCommentViewController new ];
227241
242+ vc.curProject = _curProject;
228243 vc.requestPath = [NSString stringWithFormat: @" api/user/%@ /project/%@ /git/line_notes" , _curMRPR.des_owner_name, _curMRPR.des_project_name];
229244 vc.requestParams = [@{
230245 @" noteable_type" : @" MergeRequestBean" ,
0 commit comments