summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJay Freeman (saurik) <saurik@saurik.com>2011-03-19 16:44:43 -0700
committerJay Freeman (saurik) <saurik@saurik.com>2011-03-19 16:45:31 -0700
commit0c8f53c0299df2ff10ed20b3f8658a29053205ab (patch)
treedd3a0ffa6ceca0f02c4fc0716d8272101e8d98f3
parent42e637ca7b7b264ae0a7f90c896ecf7ebb5952ba (diff)
If era_ != era goto reload; for PackageListController.
-rw-r--r--MobileCydia.mm10
1 files changed, 7 insertions, 3 deletions
diff --git a/MobileCydia.mm b/MobileCydia.mm
index 2c2734d..b8aca93 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];