summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJay Freeman (saurik) <saurik@saurik.com>2017-02-15 01:58:44 -0800
committerJay Freeman (saurik) <saurik@saurik.com>2017-02-15 01:58:44 -0800
commitf274bb0c14b13e0e7bbf65fc5a07f40fcaa482cc (patch)
tree2409eeed52901b417948aea2b2137c42efa28f95
parentcaa861bdca0452534fccc101228458f5cc6f41f2 (diff)
Hide custom function_ as an implementation detail.
-rw-r--r--CyteKit/WebViewController.h1
-rw-r--r--CyteKit/WebViewController.mm15
-rw-r--r--MobileCydia.mm9
3 files changed, 7 insertions, 18 deletions
diff --git a/CyteKit/WebViewController.h b/CyteKit/WebViewController.h
index c8630d9..20fe475 100644
--- a/CyteKit/WebViewController.h
+++ b/CyteKit/WebViewController.h
@@ -121,7 +121,6 @@
- (void) customButtonClicked;
- (void) applyRightButton;
-- (UIBarButtonItem *) customButton;
- (UIBarButtonItem *) rightButton;
- (void) applyLeftButton;
diff --git a/CyteKit/WebViewController.mm b/CyteKit/WebViewController.mm
index 18b40d9..4f11b5d 100644
--- a/CyteKit/WebViewController.mm
+++ b/CyteKit/WebViewController.mm
@@ -793,9 +793,9 @@ float CYScrollViewDecelerationRateNormal;
- (UIBarButtonItem *) customButton {
if (custom_ == nil)
- return nil;
+ return [self rightButton];
else if ((/*clang:*/id) custom_ == [NSNull null])
- return (UIBarButtonItem *) [NSNull null];
+ return nil;
return [[[UIBarButtonItem alloc]
initWithTitle:static_cast<NSString *>(custom_.operator NSObject *())
@@ -848,14 +848,7 @@ float CYScrollViewDecelerationRateNormal;
[self applyLoadingTitle];
} else {
[indicator_ stopAnimating];
-
- UIBarButtonItem *button([self customButton]);
- if (button == nil)
- button = [self rightButton];
- else if (button == (UIBarButtonItem *) [NSNull null])
- button = nil;
-
- [[self navigationItem] setRightBarButtonItem:button animated:YES];
+ [[self navigationItem] setRightBarButtonItem:[self customButton] animated:YES];
}
}
@@ -920,7 +913,7 @@ float CYScrollViewDecelerationRateNormal;
initWithTitle:(kCFCoreFoundationVersionNumber >= 800 ? @" " : @" ")
style:UIBarButtonItemStylePlain
target:self
- action:@selector(reloadButtonClicked)
+ action:@selector(customButtonClicked)
] autorelease];
UIActivityIndicatorViewStyle style;
diff --git a/MobileCydia.mm b/MobileCydia.mm
index 0485f54..a1c06d7 100644
--- a/MobileCydia.mm
+++ b/MobileCydia.mm
@@ -6398,6 +6398,9 @@ bool DepSubstrate(const pkgCache::VerIterator &iterator) {
#if !AlwaysReload
- (void) _customButtonClicked {
+ if (commercial_ && [package_ uninstalled])
+ return [self reloadURLWithCache:NO];
+
size_t count(buttons_.size());
if (count == 0)
return;
@@ -6425,12 +6428,6 @@ bool DepSubstrate(const pkgCache::VerIterator &iterator) {
}
}
-- (void) reloadButtonClicked {
- if (commercial_ && function_ == nil && [package_ uninstalled])
- return;
- [self customButtonClicked];
-}
-
- (void) applyLoadingTitle {
// Don't show "Loading" as the title. Ever.
}