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

Appearance settings

Commit e7004e4

Browse filesBrowse files
committed
LineNote 动态 显示不全的bug
1 parent d4e2e66 commit e7004e4
Copy full SHA for e7004e4

File tree

Expand file treeCollapse file tree

3 files changed

+14
-2
lines changed
Open diff view settings
Filter options
Expand file treeCollapse file tree

3 files changed

+14
-2
lines changed
Open diff view settings
Collapse file

‎Coding_iOS/Models/ProjectActivity.m‎

Copy file name to clipboardExpand all lines: Coding_iOS/Models/ProjectActivity.m
+1-1Lines 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
}
Collapse file

‎Coding_iOS/Models/ProjectLineNoteActivity.h‎

Copy file name to clipboardExpand all lines: Coding_iOS/Models/ProjectLineNoteActivity.h
+1-1Lines 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
Collapse file

‎Coding_iOS/Models/ProjectLineNoteActivity.m‎

Copy file name to clipboardExpand all lines: Coding_iOS/Models/ProjectLineNoteActivity.m
+12Lines 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 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.