Permalink
Browse files

Merge branch 'master' of github.com:omz/AppSales-Mobile

  • Loading branch information...
Ole Zorn
Ole Zorn committed Sep 8, 2011
2 parents 85c9b87 + 664d4cd commit c8d9d832cf198d9c513e549bc9e89428374919a5
Showing with 3 additions and 3 deletions.
  1. +1 −1 Classes/ReportDetailViewController.m
  2. +2 −2 Classes/SalesViewController.m
@@ -273,7 +273,7 @@ - (void)reloadData
NSDictionary *salesByProduct = [paidDownloadsByCountryAndProduct objectForKey:[country uppercaseString]];
sales = [[[salesByProduct allValues] valueForKeyPath:@"@sum.self"] integerValue];
}
- NSString *subtitle = [NSString stringWithFormat:@"%@: %i sales", [[CountryDictionary sharedDictionary] nameForCountryCode:country], sales];
+ NSString *subtitle = [NSString stringWithFormat:@"%@: %i %@", [[CountryDictionary sharedDictionary] nameForCountryCode:country], sales, sales == 1 ? @"sale" : @"sales"];
ReportDetailEntry *entry = [ReportDetailEntry entryWithRevenue:revenue percentage:percentage subtitle:subtitle country:country product:nil];
[sortedEntries addObject:entry];
}
@@ -492,7 +492,7 @@ - (NSString *)graphView:(GraphView *)graphView labelForBarAtIndex:(NSUInteger)in
- (NSString *)graphView:(GraphView *)graphView labelForSectionAtIndex:(NSUInteger)index
{
if (selectedTab == 0) {
- if ([((showWeeks) ? self.sortedWeeklyReports : self.sortedDailyReports) count] > 0) {
+ if ([((showWeeks) ? self.sortedWeeklyReports : self.sortedDailyReports) count] > index) {
Report *report = [((showWeeks) ? self.sortedWeeklyReports : self.sortedDailyReports) objectAtIndex:index];
NSDateFormatter *monthFormatter = [[[NSDateFormatter alloc] init] autorelease];
[monthFormatter setDateFormat:@"MMM '´'yy"];
@@ -501,7 +501,7 @@ - (NSString *)graphView:(GraphView *)graphView labelForSectionAtIndex:(NSUIntege
return @"N/A";
}
} else {
- if ([self.sortedCalendarMonthReports count] > 0) {
+ if ([self.sortedCalendarMonthReports count] > index) {
id<ReportSummary> report = [self.sortedCalendarMonthReports objectAtIndex:index];
NSDateFormatter *yearFormatter = [[[NSDateFormatter alloc] init] autorelease];
[yearFormatter setDateFormat:@"yyyy"];

0 comments on commit c8d9d83

Please sign in to comment.