Commit b0579422a5100b874adc1379eeb4ab9cd00a3ee4
1 parent
e796f8345c
Exists in
master
and in
1 other branch
fix index of mode in history screen
Showing 1 changed file with 8 additions and 2 deletions Side-by-side Diff
LifeLog/LifeLog/ServerAPI.m
| ... | ... | @@ -425,7 +425,10 @@ |
| 425 | 425 | NSMutableArray * arrayHistory = [[NSMutableArray alloc] init]; |
| 426 | 426 | NSDictionary * arrResult = dataResult[@"result"]; |
| 427 | 427 | if(arrResult != nil) { |
| 428 | - NSArray *arrayKey = [NSArray arrayWithObjects:@"mode_1", @"mode_2", @"mode_3", nil]; | |
| 428 | + /* mode_1: Data for mode walking | |
| 429 | + mode_2: Data for mode running | |
| 430 | + mode_3: Data for mode bike */ | |
| 431 | + NSArray *arrayKey = [NSArray arrayWithObjects:@"mode_3", @"mode_1", @"mode_2", nil]; | |
| 429 | 432 | for(NSString * key in arrayKey) { |
| 430 | 433 | NSDictionary *mode = [arrResult objectForKey:key]; |
| 431 | 434 | if(![[arrResult objectForKey:key] isKindOfClass:[NSNull class]]) { |
| ... | ... | @@ -482,7 +485,10 @@ |
| 482 | 485 | NSMutableArray * arrayHistory = [[NSMutableArray alloc] init]; |
| 483 | 486 | NSDictionary * arrResult = dataResult[@"result"]; |
| 484 | 487 | if(arrResult != nil) { |
| 485 | - NSArray *arrayKey = [NSArray arrayWithObjects:@"mode_1", @"mode_2", @"mode_3", nil]; | |
| 488 | + /* mode_1: Data for mode walking | |
| 489 | + mode_2: Data for mode running | |
| 490 | + mode_3: Data for mode bike */ | |
| 491 | + NSArray *arrayKey = [NSArray arrayWithObjects:@"mode_3", @"mode_1", @"mode_2", nil]; | |
| 486 | 492 | for(NSString * key in arrayKey) { |
| 487 | 493 | NSDictionary *mode = [arrResult objectForKey:key]; |
| 488 | 494 | if(![[arrResult objectForKey:key] isKindOfClass:[NSNull class]]) { |