Skip to content

Commit 31a3546

Browse files
committed
buffix
1 parent 2285577 commit 31a3546

24 files changed

+116
-23
lines changed

Coding_iOS.xcodeproj/project.pbxproj

Lines changed: 64 additions & 0 deletions
Large diffs are not rendered by default.

Coding_iOS/.DS_Store

0 Bytes
Binary file not shown.

Coding_iOS/Coding_iOS-Info.plist

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
<key>CFBundlePackageType</key>
1818
<string>APPL</string>
1919
<key>CFBundleShortVersionString</key>
20-
<string>5.1</string>
20+
<string>5.2</string>
2121
<key>CFBundleSignature</key>
2222
<string>????</string>
2323
<key>CFBundleURLTypes</key>
@@ -37,7 +37,7 @@
3737
</dict>
3838
</array>
3939
<key>CFBundleVersion</key>
40-
<string>5.1.201803091700</string>
40+
<string>5.2.201804031430</string>
4141
<key>ITSAppUsesNonExemptEncryption</key>
4242
<false/>
4343
<key>LSApplicationQueriesSchemes</key>

Coding_iOS/Controllers/EALocalCodeListViewController.m

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,7 @@ - (void)setupData{
6767
}
6868
return result;
6969
}];
70+
[self.myTableView reloadData];
7071
}
7172

7273
- (BOOL)isSearching{
@@ -88,7 +89,7 @@ - (void)setupNavBtn{
8889

8990
- (void)navBtnClicked{
9091
__weak typeof(self) weakSelf = self;
91-
[[UIActionSheet bk_actionSheetCustomWithTitle:nil buttonTitles:@[@"Pull"] destructiveTitle:@"删除 Repo" cancelTitle:@"取消" andDidDismissBlock:^(UIActionSheet *sheet, NSInteger index) {
92+
[[UIActionSheet bk_actionSheetCustomWithTitle:nil buttonTitles:@[@"Pull"] destructiveTitle:@"删除本地 Repo" cancelTitle:@"取消" andDidDismissBlock:^(UIActionSheet *sheet, NSInteger index) {
9293
if (index == 0) {
9394
[weakSelf pullRepo];
9495
}else if (index == 1){

Coding_iOS/Controllers/NProjectViewController/NProjectViewController.m

Lines changed: 10 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -124,12 +124,12 @@ - (void)tweetsBtnClicked{
124124

125125
#pragma mark Table M
126126
- (NSInteger)numberOfSectionsInTableView:(UITableView *)tableView{
127-
return 3;
127+
return 4;
128128
}
129129

130130
//header
131131
- (CGFloat)tableView:(UITableView *)tableView heightForHeaderInSection:(NSInteger)section{
132-
return section == 0? kLine_MinHeight: section == 1? 15.0: _myProject.is_public.boolValue? 15.0: 50.0;
132+
return section == 0? kLine_MinHeight: (section == 2 && !_myProject.is_public.boolValue)? 50: 15;
133133
}
134134

135135
- (UIView *)tableView:(UITableView *)tableView viewForHeaderInSection:(NSInteger)section{
@@ -160,7 +160,7 @@ - (UIView *)tableView:(UITableView *)tableView viewForHeaderInSection:(NSInteger
160160
}
161161

162162
- (CGFloat)tableView:(UITableView *)tableView heightForFooterInSection:(NSInteger)section{
163-
return section == 2? 15: kLine_MinHeight;
163+
return section == 3? 44: kLine_MinHeight;
164164
}
165165

166166
//data
@@ -171,7 +171,9 @@ - (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger
171171
}else if (section == 1){
172172
row = _myProject.is_public.boolValue? _myProject.current_user_role_id.integerValue <= 70? 3: 4: 6;
173173
}else if (section == 2){
174-
row = _myProject.is_public.boolValue? 3: 5;
174+
row = _myProject.is_public.boolValue? 2: 4;
175+
}else{
176+
row = 1;
175177
}
176178
return row;
177179
}
@@ -236,8 +238,6 @@ - (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(N
236238
[cell setImageStr:@"project_item_readme" andTitle:@"README"];
237239
}else if (indexPath.row == 1){
238240
[cell setImageStr:@"project_item_mr_pr" andTitle:@"Pull Request"];
239-
}else{
240-
[cell setImageStr:@"project_item_code" andTitle:@"本地阅读"];
241241
}
242242
}else{
243243
if (indexPath.row == 0) {
@@ -248,10 +248,10 @@ - (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(N
248248
[cell setImageStr:@"project_item_tag" andTitle:@"发布管理"];
249249
}else if (indexPath.row == 3){
250250
[cell setImageStr:@"project_item_mr_pr" andTitle:@"合并请求"];
251-
}else{
252-
[cell setImageStr:@"project_item_code" andTitle:@"本地阅读"];
253251
}
254252
}
253+
}else if (indexPath.section == 3){
254+
[cell setImageStr:@"project_item_code" andTitle:@"本地阅读"];
255255
}
256256
FunctionTipsManager *ftm = [FunctionTipsManager shareManager];
257257
NSString *tipStr = [self p_TipStrForIndexPath:indexPath];
@@ -301,8 +301,6 @@ - (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath
301301
[self goToReadme];
302302
}else if (indexPath.row == 1){
303303
[self goTo_MR_PR];
304-
}else{
305-
[self goToLocalRepo];
306304
}
307305
}else{
308306
if (indexPath.row == 0) {
@@ -317,10 +315,10 @@ - (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath
317315
[self.navigationController pushViewController:vc animated:YES];
318316
}else if (indexPath.row == 3){
319317
[self goTo_MR_PR];
320-
}else{
321-
[self goToLocalRepo];
322318
}
323319
}
320+
}else if (indexPath.section == 3){
321+
[self goToLocalRepo];
324322
}
325323
FunctionTipsManager *ftm = [FunctionTipsManager shareManager];
326324
NSString *tipStr = [self p_TipStrForIndexPath:indexPath];

Coding_iOS/Controllers/RootControllers/BaseViewController.m

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@
3232
#import "FileViewController.h"
3333
#import "CSTopicDetailVC.h"
3434
#import "CodeViewController.h"
35+
#import "EACodeReleaseViewController.h"
3536
#import "Ease_2FA.h"
3637

3738
#import "UnReadManager.h"
@@ -176,6 +177,7 @@ + (UIViewController *)analyseVCFromLinkStr:(NSString *)linkStr analyseMethod:(An
176177
NSString *twoFARegexStr = @"/app_intercept/show_2fa";//两步验证
177178
NSString *projectRegexStr = @"/[ut]/([^/]+)/p/([^/]+)";//项目(含团队项目)
178179
NSString *wikiRegexStr = @"/[ut]/([^/]+)/p/([^/]+)/wiki/(\\d+)";//Wiki
180+
NSString *releaseRegexStr = @"/[ut]/([^/]+)/p/([^/]+)/git/releases/([^/]+)[/]?([^?]*)";//Release
179181
NSArray *matchedCaptures = nil;
180182
if ((matchedCaptures = [linkStr captureComponentsMatchedByRegex:ppRegexStr]).count > 0){
181183
//冒泡
@@ -204,6 +206,16 @@ + (UIViewController *)analyseVCFromLinkStr:(NSString *)linkStr analyseMethod:(An
204206
vc.myProject = curPro;
205207
[vc setWikiIid:@(iid.integerValue) version:nil];
206208
analyseVC = vc;
209+
}else if ((matchedCaptures = [linkStr captureComponentsMatchedByRegex:releaseRegexStr]).count > 0){
210+
EACodeReleaseViewController *vc = [EACodeReleaseViewController new];
211+
Project *curPro = [Project new];
212+
curPro.owner_user_name = matchedCaptures[1];
213+
curPro.name = matchedCaptures[2];
214+
EACodeRelease *curR = [EACodeRelease new];
215+
curR.project = curPro;
216+
curR.tag_name = matchedCaptures[3];
217+
vc.curRelease = curR;
218+
analyseVC = vc;
207219
}else if ((matchedCaptures = [linkStr captureComponentsMatchedByRegex:pp_projectRegexStr]).count > 0){
208220
//项目内冒泡
209221
NSString *owner_user_global_key = matchedCaptures[1];
584 Bytes
Loading
1.09 KB
Loading
1.67 KB
Loading
431 Bytes
Loading

0 commit comments

Comments
 (0)