Skip to content

Commit e7004e4

Browse files
committed
LineNote 动态 显示不全的bug
1 parent d4e2e66 commit e7004e4

3 files changed

Lines changed: 14 additions & 2 deletions

File tree

Coding_iOS/Models/ProjectActivity.m

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -124,7 +124,7 @@ - (NSMutableString *)actionStr{
124124
}else if ([_target_type isEqualToString:@"MergeRequestComment"]){
125125
[_actionStr appendFormat:@" [%@] 中的 Merge Request [%@]", _depot.name, _merge_request_title];
126126
}else if ([_target_type isEqualToString:@"CommitLineNote"]){
127-
[_actionStr appendFormat:@" [%@] 的提交 [%@] ", _project.full_name, (_line_note.commit_id.length >= 10? [_line_note.commit_id substringToIndex:10]: _line_note.commit_id)];
127+
[_actionStr appendFormat:@" [%@] %@ [%@] ", _project.full_name, _line_note.noteable_type, _line_note.noteable_title];
128128
}
129129
}
130130
}

Coding_iOS/Models/ProjectLineNoteActivity.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
#import <Foundation/Foundation.h>
1010

1111
@interface ProjectLineNoteActivity : NSObject
12-
@property (readwrite, strong, nonatomic) NSString *commit_id, *commit_path, *content, *path;
12+
@property (readwrite, strong, nonatomic) NSString *noteable_id, *noteable_title, *noteable_url, *content, *path, *noteable_type;
1313
@property (readwrite, strong, nonatomic) NSNumber *id;
1414
@property (readwrite, nonatomic, strong) HtmlMedia *htmlMedia;
1515
@end

Coding_iOS/Models/ProjectLineNoteActivity.m

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,4 +15,16 @@ - (void)setContent:(NSString *)content{
1515
_content = _htmlMedia.contentDisplay;
1616
}
1717
}
18+
19+
- (NSString *)noteable_type{
20+
if ([_noteable_type isEqualToString:@"Commit"]) {
21+
return @"Commit";
22+
}else if ([_noteable_type isEqualToString:@"MergeRequestBean"]) {
23+
return @"MergeRequest";
24+
}else if ([_noteable_type isEqualToString:@"PullRequestBean"]) {
25+
return @"PullRequest";
26+
}else {
27+
return @"(⊙_⊙)?";
28+
}
29+
}
1830
@end

0 commit comments

Comments
 (0)