@@ -90,7 +90,6 @@ - (void)viewDidLoad{
9090 self.activityPath = [NSString stringWithFormat: @" /api/user/%@ /project/%@ /git/merge/%@ /activities" , _curMRPR.des_owner_name, _curMRPR.des_project_name,self .curMRPR.iid];
9191 self.diffPath = [NSString stringWithFormat: @" /api/user/%@ /project/%@ /git/merge/%@ /commitDiffContent" ,_curMRPR.des_owner_name, _curMRPR.des_project_name,self .curMRPR.iid];
9292 self.reviewGoodPath = [NSString stringWithFormat: @" /api/user/%@ /project/%@ /git/merge/%@ /review_good" ,_curMRPR.des_owner_name, _curMRPR.des_project_name,self .curMRPR.iid];
93- __weak typeof (self) weakSelf = self;
9493 _myTableView = ({
9594 UITableView *tableView = [[UITableView alloc ] initWithFrame: self .view.bounds style: UITableViewStyleGrouped];
9695 tableView.backgroundColor = kColorTableSectionBg ;
@@ -210,7 +209,6 @@ - (void)updateProjectStatus {
210209}
211210
212211- (BOOL ) shouldShowReviews {
213- Reviewer* tmpReviewer;
214212 if (self.curReviewersInfo .reviewers .count + self.curReviewersInfo .volunteer_reviewers .count > 0 ) return YES ;
215213 return NO ;
216214}
@@ -234,7 +232,6 @@ - (void)refresh{
234232 weakSelf.curMRPRInfo = data;
235233 NSMutableArray *resultA = weakSelf.curMRPRInfo .discussions ;
236234 if (resultA != nil ){
237- BOOL flag = false ;
238235 [weakSelf.allDiscussions removeAllObjects ];
239236 if (weakSelf.allDiscussions == nil || weakSelf.allDiscussions .count <= 0 ) {
240237 for (int i = 0 ; i<resultA.count ; i ++) {
@@ -275,7 +272,13 @@ - (void)refresh{
275272
276273 [[CodingNetAPIClient sharedJsonClient ] requestJsonDataWithPath: self .referencePath withParams: @{@" iid" : _curMRPR.iid } withMethodType: Get andBlock: ^(id data, NSError *error) {
277274 if (data) {
278- weakSelf.resourceReference = [NSObject objectOfClass: @" ResourceReference" fromJSON: data[@" data" ]];
275+ if (weakSelf.resourceReference == nil ) {
276+ weakSelf.resourceReference = [NSObject objectOfClass: @" ResourceReference" fromJSON: data[@" data" ]];
277+ } else {
278+ weakSelf.resourceReference = [NSObject objectOfClass: @" ResourceReference" fromJSON: data[@" data" ]];
279+ [weakSelf.myTableView reloadData ];
280+ }
281+
279282 }
280283 }];
281284
@@ -285,7 +288,6 @@ - (void)refresh{
285288 id resultData = [data valueForKeyPath: @" data" ];
286289 NSMutableArray *resultA = [NSObject arrayFromJSON: resultData ofObjects: @" ProjectLineNote" ];
287290 if (resultA != nil ){
288- BOOL flag = false ;
289291 [weakSelf.activityCList removeAllObjects ];
290292 if (weakSelf.activityCList == nil || weakSelf.activityCList .count <= 0 ) {
291293 for (int i = 0 ; i<resultA.count ; i ++) {
@@ -519,6 +521,8 @@ - (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(N
519521 [cell setImageStr: @" PR_TaskResource" andTitle: @" 关联资源" ];
520522 if (self.resourceReference .itemList .count > 0 ) {
521523 [cell setrightText: [NSString stringWithFormat: @" %lu 个" ,(unsigned long )self .resourceReference.itemList.count]];
524+ } else {
525+ [cell setNorightText ];
522526 }
523527 }
524528 [tableView addLineforPlainCell: cell forRowAtIndexPath: indexPath withLeftSpace: 50 ];
0 commit comments