Explorar o código

Reload the entire object explorer table on appearance.

We want to keep the data fresh, especially since a lot of the drill-ins can lead to changes in the data displayed in the table. Previously we reloaded only the visible cells, but this breaks when the changes alter the what we want to filter out with the search text (leads to a table view assertion). Now we’re reloading the entire table to make sure we’re safe and have the latest info displayed.
Ryan Olson %!s(int64=12) %!d(string=hai) anos
pai
achega
990b9b7b78

+ 3 - 5
Classes/Object Explorers/FLEXObjectExplorerViewController.m

@@ -95,11 +95,9 @@ static const NSInteger kFLEXObjectExplorerScopeIncludeInheritanceIndex = 1;
 
 - (void)viewWillAppear:(BOOL)animated
 {
-    NSMutableArray *visibleIndexPaths = [NSMutableArray array];
-    for (UITableViewCell *cell in [self.tableView visibleCells]) {
-        [visibleIndexPaths addObject:[self.tableView indexPathForCell:cell]];
-    }
-    [self.tableView reloadRowsAtIndexPaths:visibleIndexPaths withRowAnimation:UITableViewRowAnimationNone];
+    // Reload the entire table view rather than just the visible cells because the filtered rows
+    // may have changed (i.e. a change in the description row that causes it to get filtered out).
+    [self updateTableData];
 }
 
 - (void)scrollViewDidScroll:(UIScrollView *)scrollView