summaryrefslogtreecommitdiff
path: root/MobileCydia.mm
diff options
context:
space:
mode:
authorJay Freeman (saurik) <saurik@saurik.com>2011-03-08 03:00:15 -0800
committerJay Freeman (saurik) <saurik@saurik.com>2011-03-08 03:00:15 -0800
commitae60e2c13990f215c0fb65f195321f98f384c64f (patch)
treeb5b82b9254eb84ddcc2bfab0b2ce6dc945dfb57d /MobileCydia.mm
parent35ee854810ce90c8418e3072cfb28e246fdba013 (diff)
Fix subtle packages_ damage to yield.
Diffstat (limited to 'MobileCydia.mm')
-rw-r--r--MobileCydia.mm15
1 files changed, 11 insertions, 4 deletions
diff --git a/MobileCydia.mm b/MobileCydia.mm
index d741dda..84b2e0e 100644
--- a/MobileCydia.mm
+++ b/MobileCydia.mm
@@ -5896,6 +5896,8 @@ bool DepSubstrate(const pkgCache::VerIterator &iterator) {
return;
}
+ NSArray *packages;
+
if ([self shouldYield]) {
do {
UIProgressHUD *hud;
@@ -5908,7 +5910,7 @@ bool DepSubstrate(const pkgCache::VerIterator &iterator) {
}
reloading_ = 1;
- packages_ = [self yieldToSelector:@selector(_reloadPackages)];
+ packages = [self yieldToSelector:@selector(_reloadPackages)];
if (hud != nil)
[delegate_ removeProgressHUD:hud];
@@ -5916,9 +5918,11 @@ bool DepSubstrate(const pkgCache::VerIterator &iterator) {
reloading_ = 0;
} else {
- packages_ = [self _reloadPackages];
+ packages = [self _reloadPackages];
}
+ packages_ = packages;
+
[indices_ removeAllObjects];
[sections_ removeAllObjects];
@@ -7126,21 +7130,24 @@ bool DepSubstrate(const pkgCache::VerIterator &iterator) {
} }
- (void) _reloadData {
+ NSArray *packages;
+
reload:
if (true) {
UIProgressHUD *hud([delegate_ addProgressHUD]);
[hud setText:UCLocalize("LOADING")];
//NSLog(@"HUD:%@::%@", delegate_, hud);
- packages_ = [self yieldToSelector:@selector(_reloadPackages)];
+ packages = [self yieldToSelector:@selector(_reloadPackages)];
[delegate_ removeProgressHUD:hud];
} else {
- packages_ = [self _reloadPackages];
+ packages = [self _reloadPackages];
}
@synchronized (database_) {
if (era_ != [database_ era])
goto reload;
+ packages_ = packages;
[sections_ removeAllObjects];
Section *upgradable = [[[Section alloc] initWithName:UCLocalize("AVAILABLE_UPGRADES") localize:NO] autorelease];