Commit f4db6e55e0cc97b7ea81ea03569dbc714d1893fa
1 parent
94f43017e2
Exists in
master
Task-3287 : change value of label 目標 from step to target. Add step to check array or not
Showing 3 changed files with 5 additions and 4 deletions Side-by-side Diff
LifeLog/LifeLog/HistoryObject.m
... | ... | @@ -54,7 +54,8 @@ |
54 | 54 | NSDictionary * graph = [dict objectForKey:@"data_chart"]; |
55 | 55 | if([graph count] == 24) { |
56 | 56 | for(int i = 0; i < 24; i++) { |
57 | - [self.dataGraph addObject:[graph objectForKey:[NSString stringWithFormat:@"%d", i]]]; | |
57 | + if(![graph isKindOfClass:[NSArray class]]) | |
58 | + [self.dataGraph addObject:[graph objectForKey:[NSString stringWithFormat:@"%d", i]]]; | |
58 | 59 | } |
59 | 60 | } |
60 | 61 | } |
LifeLog/LifeLog/HistoryViewController.m
... | ... | @@ -114,7 +114,7 @@ |
114 | 114 | |
115 | 115 | -(void) updateView { |
116 | 116 | HistoryObject * obj = [_curHisArray objectAtIndex:self.viewCollectionMode.getCurrentIndex]; |
117 | - self.lblStep.text = [NSString stringWithFormat:@"%d step", obj.step]; | |
117 | + self.lblStep.text = [NSString stringWithFormat:@"%d step", obj.target]; | |
118 | 118 | self.lblCircleStep.text = self.lblStep.text; |
119 | 119 | self.lblRemaining.text = [NSString stringWithFormat:@"%d step", obj.missing]; |
120 | 120 | self.lblCircleRemain.text = [NSString stringWithFormat:@"目標まであと\n%d stepです", obj.missing]; |
LifeLog/LifeLog/ServerAPI.m
... | ... | @@ -408,7 +408,7 @@ |
408 | 408 | |
409 | 409 | #pragma mark - History Screen Function |
410 | 410 | - (void) requestHistory:(NSString *)token startDate:(NSDate *)startDate endDate:(NSDate *)endDate CompletionHandler:(void (^)(NSArray *, NSError *)) completion { |
411 | - NSString *url = [kServerAddress stringByAppendingFormat:@"/api/history/%@/%@", [Utilities stringFromDate:startDate withFormat:@"YYYYMMdd" locale:@""], [Utilities stringFromDate:endDate withFormat:@"YYYYMMdd" locale:@""]]; | |
411 | + NSString *url = [kServerAddress stringByAppendingFormat:@"api/history/%@/%@", [Utilities stringFromDate:startDate withFormat:@"YYYYMMdd" locale:@""], [Utilities stringFromDate:endDate withFormat:@"YYYYMMdd" locale:@""]]; | |
412 | 412 | NSLog(@"requestHistory link %@", url); |
413 | 413 | [self _request:url method:@"GET" token:token paras:nil completion:^(NSData *data, NSError *error) { |
414 | 414 | |
... | ... | @@ -467,7 +467,7 @@ |
467 | 467 | } |
468 | 468 | |
469 | 469 | - (void) requestHistoryList:(NSString *)token startDate:(NSDate *)startDate endDate:(NSDate *)endDate CompletionHandler:(void (^)(NSArray *, NSError *)) completion { |
470 | - NSString *url = [kServerAddress stringByAppendingFormat:@"/api/history/detail/%@/%@", [Utilities stringFromDate:startDate withFormat:@"YYYYMMdd" locale:@""], [Utilities stringFromDate:endDate withFormat:@"YYYYMMdd" locale:@""]]; | |
470 | + NSString *url = [kServerAddress stringByAppendingFormat:@"api/history/detail/%@/%@", [Utilities stringFromDate:startDate withFormat:@"YYYYMMdd" locale:@""], [Utilities stringFromDate:endDate withFormat:@"YYYYMMdd" locale:@""]]; | |
471 | 471 | NSLog(@"requestHistoryList link %@", url); |
472 | 472 | [self _request:url method:@"GET" token:token paras:nil completion:^(NSData *data, NSError *error) { |
473 | 473 |