summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJay Freeman (saurik) <saurik@saurik.com>2011-03-07 10:04:10 -0800
committerJay Freeman (saurik) <saurik@saurik.com>2011-03-08 01:50:05 -0800
commitbec28dda8282d59d90e469a463ba9cfe1f57b37d (patch)
tree450ae0ea7f93c156ed2485a6161cc0161cfc02ae
parentaa32d91b03283b6c20dbfaffc8fd554031f6b766 (diff)
Re-verify shouldBlock during _reloadPackages: loop.
-rw-r--r--MobileCydia.mm22
1 files changed, 11 insertions, 11 deletions
diff --git a/MobileCydia.mm b/MobileCydia.mm
index 985ed0d..94f783a 100644
--- a/MobileCydia.mm
+++ b/MobileCydia.mm
@@ -5857,24 +5857,24 @@ bool DepSubstrate(const pkgCache::VerIterator &iterator) {
NSArray *packages = [database_ packages];
if ([self shouldYield]) {
- UIProgressHUD *hud;
+ do {
+ UIProgressHUD *hud;
- if (![self shouldBlock])
- hud = nil;
- else {
- hud = [delegate_ addProgressHUD];
- [hud setText:UCLocalize("LOADING")];
- }
+ if (![self shouldBlock])
+ hud = nil;
+ else {
+ hud = [delegate_ addProgressHUD];
+ [hud setText:UCLocalize("LOADING")];
+ }
- do {
reloading_ = 1;
packages_ = [self yieldToSelector:@selector(_reloadPackages:) withObject:packages];
+
+ if (hud != nil)
+ [delegate_ removeProgressHUD:hud];
} while (reloading_ == 2);
reloading_ = 0;
-
- if (hud != nil)
- [delegate_ removeProgressHUD:hud];
} else {
packages_ = [self _reloadPackages:packages];
}