@@ -411,7 +411,7 @@ + (UIViewController *)analyseVCFromLinkStr:(NSString *)linkStr analyseMethod:(An
411
411
NSString *codeRegexStr = @" /[ut]/([^/]+)/p/([^/]+)/git/blob/([^/]+)[/]?([^?]*)" ;// 代码(含团队项目)
412
412
NSString *twoFARegexStr = @" /app_intercept/show_2fa" ;// 两步验证
413
413
NSString *projectRegexStr = @" /[ut]/([^/]+)/p/([^/]+)" ;// 项目(含团队项目)
414
- NSString *noticeRegexStr = @" /[ut]/([^/]+)/p/([^/]+)/setting/notice" ;// 项目公告
414
+ NSString *noticeRegexStr = @" /[ut]/([^/]+)/p/([^/]+)/setting/notice/( \\ d+) " ;// 项目公告
415
415
NSString *wikiRegexStr = @" /[ut]/([^/]+)/p/([^/]+)/wiki/(\\ d+)" ;// Wiki
416
416
NSString *releaseRegexStr = @" /[ut]/([^/]+)/p/([^/]+)/git/releases/([^/]+)[/]?([^?]*)" ;// Release
417
417
NSArray *matchedCaptures = nil ;
@@ -429,11 +429,15 @@ + (UIViewController *)analyseVCFromLinkStr:(NSString *)linkStr analyseMethod:(An
429
429
vc.curTeam = [Team teamWithGK: team_global_key];
430
430
analyseVC = vc;
431
431
}else if ((matchedCaptures = [linkStr captureComponentsMatchedByRegex: noticeRegexStr]).count > 0 ){
432
- UserOrProjectTweetsViewController *vc = [UserOrProjectTweetsViewController new ];
432
+ // 项目公告
433
+ NSString *owner_user_global_key = matchedCaptures[1 ];
434
+ NSString *project_name = matchedCaptures[2 ];
435
+ NSString *pp_id = matchedCaptures[3 ];
433
436
Project *curPro = [Project new ];
434
- curPro.owner_user_name = matchedCaptures[1 ];
435
- curPro.name = matchedCaptures[2 ];
436
- vc.curTweets = [Tweets tweetsWithProject: curPro];
437
+ curPro.owner_user_name = owner_user_global_key;
438
+ curPro.name = project_name;
439
+ TweetDetailViewController *vc = [[TweetDetailViewController alloc ] init ];
440
+ vc.curTweet = [Tweet tweetInProject: curPro andPPID: pp_id];
437
441
analyseVC = vc;
438
442
}else if ((matchedCaptures = [linkStr captureComponentsMatchedByRegex: wikiRegexStr]).count > 0 ){
439
443
WikiViewController *vc = [WikiViewController new ];
@@ -819,6 +823,7 @@ + (UIViewController *)analyseVCFromLinkStr:(NSString *)linkStr analyseMethod:(An
819
823
NSString *codeRegexStr = @" /[ut]/([^/]+)/p/([^/]+)/git/blob/([^/]+)[/]?([^?]*)" ;// 代码(含团队项目)
820
824
NSString *twoFARegexStr = @" /app_intercept/show_2fa" ;// 两步验证
821
825
NSString *projectRegexStr = @" /[ut]/([^/]+)/p/([^/]+)" ;// 项目(含团队项目)
826
+ NSString *noticeRegexStr = @" /[ut]/([^/]+)/p/([^/]+)/setting/notice/(\\ d+)" ;// 项目公告
822
827
NSString *wikiRegexStr = @" /[ut]/([^/]+)/p/([^/]+)/wiki/(\\ d+)" ;// Wiki
823
828
NSString *releaseRegexStr = @" /[ut]/([^/]+)/p/([^/]+)/git/releases/([^/]+)[/]?([^?]*)" ;// Release
824
829
NSArray *matchedCaptures = nil ;
@@ -840,6 +845,17 @@ + (UIViewController *)analyseVCFromLinkStr:(NSString *)linkStr analyseMethod:(An
840
845
vc.curTweet = [Tweet tweetWithGlobalKey: user_global_key andPPID: pp_id];
841
846
analyseVC = vc;
842
847
}
848
+ }else if ((matchedCaptures = [linkStr captureComponentsMatchedByRegex: noticeRegexStr]).count > 0 ){
849
+ // 项目公告
850
+ NSString *owner_user_global_key = matchedCaptures[1 ];
851
+ NSString *project_name = matchedCaptures[2 ];
852
+ NSString *pp_id = matchedCaptures[3 ];
853
+ Project *curPro = [Project new ];
854
+ curPro.owner_user_name = owner_user_global_key;
855
+ curPro.name = project_name;
856
+ TweetDetailViewController *vc = [[TweetDetailViewController alloc ] init ];
857
+ vc.curTweet = [Tweet tweetInProject: curPro andPPID: pp_id];
858
+ analyseVC = vc;
843
859
}else if ((matchedCaptures = [linkStr captureComponentsMatchedByRegex: wikiRegexStr]).count > 0 ){
844
860
WikiViewController *vc = [WikiViewController new ];
845
861
Project *curPro = [Project new ];
0 commit comments