Skip to content

Commit da59925

Browse files
committed
此 commit 改动太多,不宜在网页上展示
1 parent 897853d commit da59925

4 files changed

Lines changed: 9 additions & 6 deletions

File tree

Coding_iOS/Controllers/CommitFilesViewController.m

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -80,13 +80,17 @@ - (void)refresh{
8080
[weakSelf configListGroups];
8181
[weakSelf.myTableView reloadData];
8282
}
83-
[weakSelf.view configBlankPage:EaseBlankPageTypeView hasData:(weakSelf.curCommitInfo != nil) hasError:(error != nil) reloadButtonBlock:^(id sender) {
83+
[weakSelf.view configBlankPage:EaseBlankPageTypeView hasData:(weakSelf.curCommitInfo.commitDetail != nil) hasError:(error != nil) reloadButtonBlock:^(id sender) {
8484
[weakSelf refresh];
8585
}];
8686
}];
8787
}
8888

8989
- (void)configListGroups{
90+
if (_curCommitInfo && !_curCommitInfo.commitDetail) {
91+
kTipAlert(@"此 commit 改动太多,不宜在客户端上展示");
92+
return;
93+
}
9094
if (!_listGroupKeys) {
9195
_listGroupKeys = [NSMutableArray new];
9296
}
@@ -136,7 +140,7 @@ - (UIView *)tableView:(UITableView *)tableView viewForHeaderInSection:(NSInteger
136140

137141
- (NSInteger)numberOfSectionsInTableView:(UITableView *)tableView{
138142
NSInteger section = 0;
139-
if (_curCommitInfo) {
143+
if (_curCommitInfo.commitDetail) {
140144
section = 1+ _listGroupKeys.count+ 1;
141145
if (_curCommitInfo.commitComments.count > 0) {
142146
section += 1;
@@ -157,6 +161,7 @@ - (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger
157161
}else{
158162
return 1;
159163
}
164+
return 0;
160165
}
161166

162167
- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath{

Coding_iOS/Models/FileChange.m

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ - (void)setPath:(NSString *)path{
2020
_displayFilePath = @"/";
2121
_displayFileName = _path;
2222
}else{
23-
_displayFilePath = [_path substringToIndex:range.location];
23+
_displayFilePath = [_path substringToIndex:range.location +1];
2424
_displayFileName = [_path substringFromIndex:range.location +1];
2525
}
2626
}

Coding_iOS/Util/OC_Category/NSObject+ObjectMap.m

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -262,9 +262,6 @@ +(id)objectOfClass:(NSString *)object fromJSON:(NSDictionary *)dict {
262262
}
263263

264264
-(NSString *)classOfPropertyNamed:(NSString *)propName {
265-
if ([propName isEqualToString:@"committer"]) {
266-
NSLog(@"ddd");
267-
}
268265
unsigned count;
269266
objc_property_t *properties = class_copyPropertyList([self class], &count);
270267

Coding_iOS/Views/Cell/CommitContentCell.m

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,7 @@ - (id)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reus
6161
if (!_lineView) {
6262
_lineView = [UIView new];
6363
_lineView.backgroundColor = [UIColor colorWithPatternImage:[UIImage imageNamed:@"dot_line"]];
64+
[self.contentView addSubview:_lineView];
6465
[_lineView mas_makeConstraints:^(MASConstraintMaker *make) {
6566
make.left.equalTo(self.contentView).offset(kPaddingLeftWidth);
6667
make.right.equalTo(self.contentView).offset(-kPaddingLeftWidth);

0 commit comments

Comments
 (0)