Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit 46498de

Browse files
wanghenghengEase
authored and
Ease
committed
push代码,只有一个commit的,进入到对应的commit;多于一个的,进入到commit列表
1 parent bcbac61 commit 46498de

File tree

1 file changed

+13
-4
lines changed

1 file changed

+13
-4
lines changed

‎Coding_iOS/Controllers/ProjectViewController.m

Lines changed: 13 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -439,12 +439,21 @@ - (void)goToVCWithItem:(HtmlMediaItem *)clickedItem activity:(ProjectActivity *)
439439
}else{
440440
[NSObject showHudTipStr:@"没找到 Fork 到哪里去了~"];
441441
}
442+
}else if ([proAct.action isEqualToString:@"push"]){
443+
if (proAct.commits.count == 1) {
444+
Commit *firstCommit = [proAct.commits firstObject];
445+
NSString *request_path = [NSString stringWithFormat:@"%@/commit/%@", proAct.depot.path, firstCommit.sha];
446+
CommitFilesViewController *vc = [CommitFilesViewController vcWithPath:request_path];
447+
[self.navigationController pushViewController:vc animated:YES];
448+
}else{
449+
NSString *ref = proAct.ref? proAct.ref : @"master";
450+
ProjectCommitsViewController *vc = [ProjectCommitsViewController new];
451+
vc.curProject = project;
452+
vc.curCommits = [Commits commitsWithRef:ref Path:@""];
453+
[self.navigationController pushViewController:vc animated:YES];
454+
}
442455
}else{
443456
ProjectViewController *vc = [ProjectViewController codeVCWithCodeRef:proAct.ref andProject:project];
444-
// NSString *ref = proAct.ref? proAct.ref : @"master";
445-
// ProjectCommitsViewController *vc = [ProjectCommitsViewController new];
446-
// vc.curProject = project;
447-
// vc.curCommits = [Commits commitsWithRef:ref Path:@""];
448457
[self.navigationController pushViewController:vc animated:YES];
449458
}
450459
}else if ([target_type isEqualToString:@"PullRequestBean"] ||

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /