diff options
author | Jay Freeman (saurik) <saurik@saurik.com> | 2011-02-26 23:24:11 -0800 |
---|---|---|
committer | Jay Freeman (saurik) <saurik@saurik.com> | 2011-03-07 02:41:25 -0800 |
commit | a70cd4ba4eae0194a14559433b24960672dccf75 (patch) | |
tree | e398198bf3a4755fef27c6c10b73d9c8ed64b345 | |
parent | 14e4ff091b1bf90ec66b209d96d9f225d6630054 (diff) |
Make ChangesController honor the lazy-loading API.
-rw-r--r-- | MobileCydia.mm | 22 |
1 files changed, 7 insertions, 15 deletions
diff --git a/MobileCydia.mm b/MobileCydia.mm index e9579c4..f3fd9a5 100644 --- a/MobileCydia.mm +++ b/MobileCydia.mm @@ -7527,7 +7527,6 @@ bool DepSubstrate(const pkgCache::VerIterator &iterator) { NSMutableArray *sections_; UITableView *list_; unsigned upgrades_; - BOOL hasSentFirstLoad_; } - (id) initWithDatabase:(Database *)database; @@ -7548,21 +7547,9 @@ bool DepSubstrate(const pkgCache::VerIterator &iterator) { return [NSURL URLWithString:@"cydia://changes"]; } -- (void) viewWillAppear:(BOOL)animated { - // Loads after it appears, so don't load beforehand. - loaded_ = YES; - [super viewWillAppear:animated]; -} - - (void) viewDidAppear:(BOOL)animated { [super viewDidAppear:animated]; - - if (!hasSentFirstLoad_) { - hasSentFirstLoad_ = YES; - [self performSelector:@selector(reloadData) withObject:nil afterDelay:0.0]; - } else { - [list_ deselectRowAtIndexPath:[list_ indexPathForSelectedRow] animated:animated]; - } + [list_ deselectRowAtIndexPath:[list_ indexPathForSelectedRow] animated:animated]; } - (NSInteger) numberOfSectionsInTableView:(UITableView *)list { @@ -7672,7 +7659,7 @@ bool DepSubstrate(const pkgCache::VerIterator &iterator) { _trace(); } -- (void) reloadData { +- (void) _reloadData { @synchronized (database_) { era_ = [database_ era]; NSArray *packages = [database_ packages]; @@ -7770,6 +7757,11 @@ bool DepSubstrate(const pkgCache::VerIterator &iterator) { PrintTimes(); } } +- (void) reloadData { + [super reloadData]; + [self performSelector:@selector(_reloadData) withObject:nil afterDelay:0]; +} + @end /* }}} */ /* Search Controller {{{ */ |