Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

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

  • Loading branch information...
commit 86353cb8edf3d0688c1f531e9135258d32367d75 1 parent 63ba103
Ole Zorn authored
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];
}
}
Please sign in to comment.
Something went wrong with that request. Please try again.