Skip to content

Commit 74f7a14

Browse files
committed
文件动态 - 删除历史版本
1 parent faab78a commit 74f7a14

4 files changed

Lines changed: 11 additions & 2 deletions

File tree

Coding_iOS.xcodeproj/project.pbxproj

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -115,6 +115,7 @@
115115
4E2719B81AB02F31006AE214 /* NProjectViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 4E2719B71AB02F31006AE214 /* NProjectViewController.m */; };
116116
4E2719C71AB07ED6006AE214 /* [email protected] in Resources */ = {isa = PBXBuildFile; fileRef = 4E2719C61AB07ED6006AE214 /* [email protected] */; };
117117
4E2906A21A403B7D008A5B97 /* FileDownloadView.m in Sources */ = {isa = PBXBuildFile; fileRef = 4E2906A11A403B7D008A5B97 /* FileDownloadView.m */; };
118+
4E2BF3BC1B957D4F00A5A0A8 /* [email protected] in Resources */ = {isa = PBXBuildFile; fileRef = 4E2BF3BB1B957D4F00A5A0A8 /* [email protected] */; };
118119
4E35A99F1A3EC47E00CE35F1 /* FileViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 4E35A99E1A3EC47E00CE35F1 /* FileViewController.m */; };
119120
4E38CF5F1A7A28AF005536C0 /* CodeBranchTagButton.m in Sources */ = {isa = PBXBuildFile; fileRef = 4E38CF5E1A7A28AF005536C0 /* CodeBranchTagButton.m */; };
120121
4E38CF621A7B7C99005536C0 /* CodeBranchOrTag.m in Sources */ = {isa = PBXBuildFile; fileRef = 4E38CF611A7B7C99005536C0 /* CodeBranchOrTag.m */; };
@@ -1044,6 +1045,7 @@
10441045
4E2719C61AB07ED6006AE214 /* [email protected] */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "[email protected]"; sourceTree = "<group>"; };
10451046
4E2906A01A403B7D008A5B97 /* FileDownloadView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = FileDownloadView.h; sourceTree = "<group>"; };
10461047
4E2906A11A403B7D008A5B97 /* FileDownloadView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = FileDownloadView.m; sourceTree = "<group>"; };
1048+
4E2BF3BB1B957D4F00A5A0A8 /* [email protected] */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "[email protected]"; sourceTree = "<group>"; };
10471049
4E35A99D1A3EC47E00CE35F1 /* FileViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = FileViewController.h; sourceTree = "<group>"; };
10481050
4E35A99E1A3EC47E00CE35F1 /* FileViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = FileViewController.m; sourceTree = "<group>"; };
10491051
4E38CF5D1A7A28AF005536C0 /* CodeBranchTagButton.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CodeBranchTagButton.h; sourceTree = "<group>"; };
@@ -2949,6 +2951,7 @@
29492951
4EAE06BD1B7B51AF00179F4B /* [email protected] */,
29502952
4EAE06BE1B7B51AF00179F4B /* [email protected] */,
29512953
4EAE06BF1B7B51AF00179F4B /* [email protected] */,
2954+
4E2BF3BB1B957D4F00A5A0A8 /* [email protected] */,
29522955
);
29532956
path = file_activity_icon;
29542957
sourceTree = "<group>";
@@ -4924,6 +4927,7 @@
49244927
7E335D9E1B6F5E94003D0F3D /* [email protected] in Resources */,
49254928
8EA6D18519E240C40076D59C /* [email protected] in Resources */,
49264929
8EA6D18219E240C40076D59C /* [email protected] in Resources */,
4930+
4E2BF3BC1B957D4F00A5A0A8 /* [email protected] in Resources */,
49274931
8EA6D18119E240C40076D59C /* [email protected] in Resources */,
49284932
4E753D481B8DA099003A00B9 /* diff-ios.html in Resources */,
49294933
8E7612F41A08B1EA005BE797 /* [email protected] in Resources */,
1.36 KB
Loading

Coding_iOS/Models/ProjectActivity.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919

2020
@interface ProjectActivity : NSObject
2121
@property (readwrite, nonatomic, strong) NSNumber *id;
22-
@property (readwrite, nonatomic, strong) NSString *target_type, *action, *action_msg, *type, *ref, *ref_type, *ref_path, *pull_request_title, *merge_request_title, *comment_content, *merge_request_path, *pull_request_path;
22+
@property (readwrite, nonatomic, strong) NSString *target_type, *action, *action_msg, *type, *ref, *ref_type, *ref_path, *pull_request_title, *merge_request_title, *comment_content, *merge_request_path, *pull_request_path, *version;
2323
@property (readwrite, nonatomic, strong) User *user, *target_user;
2424
@property (readwrite, nonatomic, strong) NSDate *created_at;
2525
@property (readwrite, nonatomic, strong) Task *origin_task, *task;

Coding_iOS/Views/Cell/FileActivityCell.m

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,12 @@ + (NSAttributedString *)attrContentWithObj:(ProjectActivity *)curActivity{
1919
userName = curActivity.user.name? curActivity.user.name: @"";
2020
NSMutableAttributedString *attrContent;
2121

22-
contentStr = [NSString stringWithFormat:@"%@ 文件 - %@", curActivity.action_msg, [curActivity.created_at stringDisplay_HHmm]];
22+
if ([curActivity.action isEqualToString:@"delete_history"]) {
23+
contentStr = [NSString stringWithFormat:@"%@ 历史版本 V%@ - %@", curActivity.action_msg, curActivity.version, [curActivity.created_at stringDisplay_HHmm]];
24+
25+
}else{
26+
contentStr = [NSString stringWithFormat:@"%@ 文件 - %@", curActivity.action_msg, [curActivity.created_at stringDisplay_HHmm]];
27+
}
2328

2429
attrContent = [[NSMutableAttributedString alloc] initWithString:[NSString stringWithFormat:@"%@ %@", userName, contentStr]];
2530
[attrContent addAttributes:@{NSFontAttributeName : [UIFont boldSystemFontOfSize:13],

0 commit comments

Comments
 (0)