@@ -235,15 +235,13 @@ - (void)refresh{
235235 NSMutableArray *resultA = weakSelf.curMRPRInfo .discussions ;
236236 if (resultA != nil ){
237237 [weakSelf.allDiscussions removeAllObjects ];
238- if (weakSelf.allDiscussions == nil || weakSelf.allDiscussions .count <= 0 ) {
239- for (int i = 0 ; i<resultA.count ; i ++) {
240- NSArray *pArray = resultA[i];
241- ProjectLineNote* addTmp = pArray[0 ];
242- if (addTmp.path != nil ) {
243- addTmp.action = @" mergeChanges" ;
244- }
245- [weakSelf.allDiscussions addObject: addTmp];
238+ for (int i = 0 ; i<resultA.count ; i ++) {
239+ NSArray *pArray = resultA[i];
240+ ProjectLineNote* addTmp = pArray[0 ];
241+ if (addTmp.path != nil ) {
242+ addTmp.action = @" mergeChanges" ;
246243 }
244+ [weakSelf.allDiscussions addObject: addTmp];
247245 }
248246 }
249247 weakSelf.bottomView = nil ;
@@ -281,16 +279,12 @@ - (void)refresh{
281279 }];
282280 [[CodingNetAPIClient sharedJsonClient ] requestJsonDataWithPath: self .activityPath withParams: @{@" iid" : _curMRPR.iid } withMethodType: Get andBlock: ^(id data, NSError *error) {
283281 if (data) {
284- weakSelf.loadedActivty = true ;
285282 id resultData = [data valueForKeyPath: @" data" ];
286283 NSMutableArray *resultA = [NSObject arrayFromJSON: resultData ofObjects: @" ProjectLineNote" ];
287284 if (resultA != nil ){
288- [weakSelf.activityCList removeAllObjects ];
289- if (weakSelf.activityCList == nil || weakSelf.activityCList .count <= 0 ) {
290- for (int i = 0 ; i<resultA.count ; i ++) {
291- ProjectLineNote* addTmp = resultA[i];
292- [weakSelf.activityCList addObject: addTmp];
293- }
285+ for (int i = 0 ; i<resultA.count ; i ++) {
286+ ProjectLineNote* addTmp = resultA[i];
287+ [weakSelf.activityCList addObject: addTmp];
294288 }
295289 [weakSelf sortActivityList ];
296290 }
0 commit comments