diff options
author | Jay Freeman (saurik) <saurik@saurik.com> | 2011-02-20 01:13:14 -0800 |
---|---|---|
committer | Jay Freeman (saurik) <saurik@saurik.com> | 2011-02-20 01:13:14 -0800 |
commit | ab2cfc1e0f4678f398698b0d9db90c69e1e71f3c (patch) | |
tree | 8d83672b5f920b8a54d469b60565838c53fe20b1 /MobileCydia.mm | |
parent | 781001d7dc0daae06425654cc65ac758157917dd (diff) |
Factor out -[ConfirmationController complete].
Diffstat (limited to 'MobileCydia.mm')
-rw-r--r-- | MobileCydia.mm | 21 |
1 files changed, 11 insertions, 10 deletions
diff --git a/MobileCydia.mm b/MobileCydia.mm index 484d0ed..31d4c47 100644 --- a/MobileCydia.mm +++ b/MobileCydia.mm @@ -4470,16 +4470,20 @@ bool DepSubstrate(const pkgCache::VerIterator &iterator) { [super dealloc]; } +- (void) complete { + if (substrate_) + Finish_ = 2; + [delegate_ confirmWithNavigationController:[self navigationController]]; +} + - (void) alertView:(UIAlertView *)alert clickedButtonAtIndex:(NSInteger)button { NSString *context([alert context]); if ([context isEqualToString:@"remove"]) { - if (button == [alert cancelButtonIndex]) { + if (button == [alert cancelButtonIndex]) [self dismissModalViewControllerAnimated:YES]; - } else if (button == [alert firstOtherButtonIndex]) { - if (substrate_) - Finish_ = 2; - [delegate_ confirmWithNavigationController:[self navigationController]]; + else if (button == [alert firstOtherButtonIndex]) { + [self complete]; } [alert dismissWithClickedButtonIndex:-1 animated:YES]; @@ -4717,11 +4721,8 @@ bool DepSubstrate(const pkgCache::VerIterator &iterator) { - (void) confirmButtonClicked { if (essential_ != nil) [essential_ show]; - else { - if (substrate_) - Finish_ = 2; - [delegate_ confirmWithNavigationController:[self navigationController]]; - } + else + [self complete]; } #endif |