From 0c8f53c0299df2ff10ed20b3f8658a29053205ab Mon Sep 17 00:00:00 2001 From: "Jay Freeman (saurik)" Date: Sat, 19 Mar 2011 16:44:43 -0700 Subject: [PATCH 1/1] If era_ != era goto reload; for PackageListController. --- MobileCydia.mm | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/MobileCydia.mm b/MobileCydia.mm index 2c2734db..b8aca937 100644 --- a/MobileCydia.mm +++ b/MobileCydia.mm @@ -6295,6 +6295,7 @@ bool DepSubstrate(const pkgCache::VerIterator &iterator) { NSArray *packages; + reload: if ([self shouldYield]) { do { UIProgressHUD *hud; @@ -6312,12 +6313,15 @@ bool DepSubstrate(const pkgCache::VerIterator &iterator) { if (hud != nil) [delegate_ removeProgressHUD:hud]; } while (reloading_ == 2); - - reloading_ = 0; } else { packages = [self _reloadPackages]; } +@synchronized (database_) { + if (era_ != [database_ era]) + goto reload; + reloading_ = 0; + packages_ = packages; indices_ = [NSMutableDictionary dictionaryWithCapacity:32]; @@ -6403,7 +6407,7 @@ bool DepSubstrate(const pkgCache::VerIterator &iterator) { [(UITableView *) list_ setDataSource:self]; [list_ reloadData]; _end -} +} } - (void) reloadData { [super reloadData]; -- 2.47.2