From da3ec19ce7f0dd6d55869172e73b4bedc40b7fd9 Mon Sep 17 00:00:00 2001 From: "Jay Freeman (saurik)" Date: Mon, 14 Mar 2011 08:04:25 -0700 Subject: Use verifying HUD for repotag and don't overlay dialog. --- MobileCydia.mm | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/MobileCydia.mm b/MobileCydia.mm index 84029d5..d322325 100644 --- a/MobileCydia.mm +++ b/MobileCydia.mm @@ -8255,6 +8255,8 @@ bool DepSubstrate(const pkgCache::VerIterator &iterator) { - (void) complete { [delegate_ addTrivialSource:href_]; + href_ = nil; + [delegate_ syncData]; } @@ -8295,13 +8297,15 @@ bool DepSubstrate(const pkgCache::VerIterator &iterator) { trivial_bz2_ == nil && trivial_gz_ == nil ) { + NSString *warning(cydia_ ? [self yieldToSelector:@selector(getWarning)] : nil); + [delegate_ releaseNetworkActivityIndicator]; [delegate_ removeProgressHUD:hud_]; hud_ = nil; if (cydia_) { - if (NSString *warning = [self yieldToSelector:@selector(getWarning)]) { + if (warning != nil) { UIAlertView *alert = [[[UIAlertView alloc] initWithTitle:UCLocalize("SOURCE_WARNING") message:warning @@ -8333,6 +8337,8 @@ bool DepSubstrate(const pkgCache::VerIterator &iterator) { [alert setContext:@"urlerror"]; [alert show]; + + href_ = nil; } else { UIAlertView *alert = [[[UIAlertView alloc] initWithTitle:UCLocalize("NOT_REPOSITORY") @@ -8344,9 +8350,10 @@ bool DepSubstrate(const pkgCache::VerIterator &iterator) { [alert setContext:@"trivial"]; [alert show]; + + href_ = nil; } - href_ = nil; error_ = nil; } } @@ -8434,7 +8441,7 @@ bool DepSubstrate(const pkgCache::VerIterator &iterator) { else if ([context isEqualToString:@"warning"]) { switch (button) { case 1: - [self complete]; + [self performSelector:@selector(complete) withObject:nil afterDelay:0]; break; case 0: @@ -8443,8 +8450,6 @@ bool DepSubstrate(const pkgCache::VerIterator &iterator) { _nodefault } - href_ = nil; - [alert dismissWithClickedButtonIndex:-1 animated:YES]; } } -- cgit v1.2.3