Browse files

Fixed selection of "All Apps" when switching between reports and months

  • Loading branch information...
1 parent 63ba103 commit 86353cb8edf3d0688c1f531e9135258d32367d75 Ole Zorn committed Jun 22, 2012
Showing with 4 additions and 4 deletions.
  1. +4 −4 Classes/DashboardViewController.m
View
8 Classes/DashboardViewController.m
@@ -253,14 +253,14 @@ - (void)reloadData
- (void)reloadTableView
{
//Reload the table view, preserving the current selection:
- [self.productsTableView reloadData];
NSArray *selectedIndexPaths = [self.productsTableView indexPathsForSelectedRows];
- if ([selectedIndexPaths count]) {
- for (NSIndexPath* selectedIndexPath in selectedIndexPaths) {
+ [self.productsTableView reloadData];
+ if ([selectedIndexPaths count] > 0) {
+ for (NSIndexPath *selectedIndexPath in selectedIndexPaths) {
[self.productsTableView selectRowAtIndexPath:selectedIndexPath animated:NO scrollPosition:UITableViewScrollPositionNone];
}
} else {
- NSIndexPath* selectedIndexPath = [NSIndexPath indexPathForRow:0 inSection:0];
+ NSIndexPath *selectedIndexPath = [NSIndexPath indexPathForRow:0 inSection:0];
[self.productsTableView selectRowAtIndexPath:selectedIndexPath animated:NO scrollPosition:UITableViewScrollPositionNone];
}
}

0 comments on commit 86353cb

Please sign in to comment.