77//
88
99#import " ProjectActivity.h"
10+ #import " NSMutableString+Common.h"
1011
1112@implementation ProjectActivity
1213@synthesize actionStr = _actionStr, contentStr = _contentStr;
@@ -74,7 +75,7 @@ - (NSMutableString *)actionStr{
7475 }else if ([_action isEqualToString: @" update_description" ]) {
7576 [_actionStr appendFormat: @" 更新了任务 [%@ ] 的描述" , _task.title];
7677 }else {
77- [_actionStr appendString : _action_msg];
78+ [_actionStr saveAppendString : _action_msg];
7879 if (_origin_task.owner ) {
7980 [self addActionUser: _origin_task.owner];
8081 [_actionStr appendString: @" 的" ];
@@ -91,7 +92,7 @@ - (NSMutableString *)actionStr{
9192 [_actionStr appendFormat: @" %@ 任务 [%@ ] 的评论" , _action_msg, _task.title];
9293 }else {
9394 [self addActionUser: _user];
94- [_actionStr appendString : _action_msg];
95+ [_actionStr saveAppendString : _action_msg];
9596 if ([_target_type isEqualToString: @" ProjectTopic" ]){
9697 [_actionStr appendString: @" 讨论" ];
9798 if ([_action isEqualToString: @" comment" ]) {
@@ -143,26 +144,26 @@ - (NSMutableString *)contentStr{
143144 }else if ([_action isEqualToString: @" update_deadline" ] && _task.deadline && _task.deadline .length > 0 ) {
144145 [_contentStr appendFormat: @" [%@ ]" , [NSDate convertStr_yyyy_MM_ddToDisplay: _task.deadline]];
145146 }else if ([_action isEqualToString: @" update_description" ]) {
146- [_contentStr appendString : _task.description_mine];
147+ [_contentStr saveAppendString : _task.description_mine];
147148 }else {
148- [_contentStr appendString : _task.title];
149+ [_contentStr saveAppendString : _task.title];
149150 }
150151 }else if ([_target_type isEqualToString: @" TaskComment" ]){
151152 if (_taskComment.content ) {
152- [_contentStr appendString : _taskComment.content];
153+ [_contentStr saveAppendString : _taskComment.content];
153154 }
154155 }else if ([_target_type isEqualToString: @" ProjectTopic" ]){
155156 if ([_action isEqualToString: @" comment" ]) {
156- [_contentStr appendString : _project_topic.content];
157+ [_contentStr saveAppendString : _project_topic.content];
157158 }else {
158- [_contentStr appendString : _project_topic.title];
159+ [_contentStr saveAppendString : _project_topic.title];
159160 }
160161 }else if ([_target_type isEqualToString: @" ProjectFile" ]){
161- [_contentStr appendString : _file.name];
162+ [_contentStr saveAppendString : _file.name];
162163 }else if ([_target_type isEqualToString: @" Depot" ]){
163164 if (_commits && [_commits count ] > 0 ) {
164165 Commit *curCommit = _commits.firstObject ;
165- [_contentStr appendString : curCommit.contentStr];
166+ [_contentStr saveAppendString : curCommit.contentStr];
166167 for (int i = 1 ; i<[_commits count ]; i++) {
167168 curCommit = [_commits objectAtIndex: i];
168169 [_contentStr appendFormat: @" \n %@ " ,curCommit.contentStr];
@@ -171,26 +172,26 @@ - (NSMutableString *)contentStr{
171172 }else {
172173 if ([_target_type isEqualToString: @" ProjectMember" ]) {
173174 if ([_action isEqualToString: @" quit" ]) {
174- [_contentStr appendString : _project.full_name];
175+ [_contentStr saveAppendString : _project.full_name];
175176 }else {
176- [_contentStr appendString : _target_user.name];
177+ [_contentStr saveAppendString : _target_user.name];
177178 }
178179 }else if ([_target_type isEqualToString: @" Project" ]){
179- [_contentStr appendString : _project.full_name];
180+ [_contentStr saveAppendString : _project.full_name];
180181 }else if ([_target_type isEqualToString: @" QcTask" ]){
181- [_contentStr appendString : _qc_task.link];
182+ [_contentStr saveAppendString : _qc_task.link];
182183 }else if ([_target_type isEqualToString: @" ProjectStar" ]){
183- [_contentStr appendString : _project.full_name];
184+ [_contentStr saveAppendString : _project.full_name];
184185 }else if ([_target_type isEqualToString: @" ProjectWatcher" ]){
185- [_contentStr appendString : _project.full_name];
186+ [_contentStr saveAppendString : _project.full_name];
186187 }else if ([_target_type isEqualToString: @" PullRequestBean" ]){
187- [_contentStr appendString : _pull_request_title];
188+ [_contentStr saveAppendString : _pull_request_title];
188189 }else if ([_target_type isEqualToString: @" PullRequestComment" ]){
189- [_contentStr appendString : _comment_content];
190+ [_contentStr saveAppendString : _comment_content];
190191 }else if ([_target_type isEqualToString: @" MergeRequestBean" ]){
191- [_contentStr appendString : _merge_request_title];
192+ [_contentStr saveAppendString : _merge_request_title];
192193 }else if ([_target_type isEqualToString: @" MergeRequestComment" ]){
193- [_contentStr appendString : _comment_content];
194+ [_contentStr saveAppendString : _comment_content];
194195 }else if ([_target_type isEqualToString: @" CommitLineNote" ]){
195196 [_contentStr appendFormat: @" %@ " , _line_note.content];
196197 }else {
0 commit comments