Skip to content

Commit

Permalink
Fixed a bug in contribution graph.
Browse files Browse the repository at this point in the history
  • Loading branch information
hukun01 committed Feb 12, 2014
1 parent 3eeed35 commit 9435ae5
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions Runner Stats/ViewController/RSStatsSecondVC.m
Original file line number Diff line number Diff line change
Expand Up @@ -129,11 +129,11 @@ - (void)setupContributionGraphData
}
}
NSInteger daysUntilNow = [calendar ordinalityOfUnit:NSDayCalendarUnit inUnit:NSMonthCalendarUnit forDate:[NSDate date]];
for (int i=0; i < daysUntilNow-days-1; ++i) {
for (int i=0; i < daysUntilNow-days; ++i) {
[result addObject:@0];
}
// Change today's rect to green color
[result addObject:@5];
[result replaceObjectAtIndex:[result count]-1 withObject:@5];

self.contributionGraph.data = result;
}
Expand Down

0 comments on commit 9435ae5

Please # to comment.