From: Jay Freeman (saurik) Date: Tue, 8 Mar 2011 06:33:29 +0000 (-0800) Subject: Post CydiaReloadData events, don't actually reload the page. X-Git-Tag: v1.1.0%b1~13 X-Git-Url: https://git.saurik.com/cydia.git/commitdiff_plain/d9fc1d3713a7d40d51ffd8db08b7045fa5a263d1 Post CydiaReloadData events, don't actually reload the page. --- diff --git a/CyteKit/WebViewController.h b/CyteKit/WebViewController.h index 76bdd82d..897a2040 100644 --- a/CyteKit/WebViewController.h +++ b/CyteKit/WebViewController.h @@ -71,6 +71,7 @@ bool error_; _H request_; + bool ready_; _H stage1_; _H stage2_; diff --git a/CyteKit/WebViewController.mm b/CyteKit/WebViewController.mm index 4dc94ef6..4bd05b95 100644 --- a/CyteKit/WebViewController.mm +++ b/CyteKit/WebViewController.mm @@ -178,6 +178,7 @@ float CYScrollViewDecelerationRateNormal; #endif error_ = false; + ready_ = true; WebThreadLocked lock; [webview_ loadRequest:request]; @@ -216,7 +217,11 @@ float CYScrollViewDecelerationRateNormal; - (void) reloadData { [super reloadData]; - [self reloadURLWithCache:YES]; + + if (ready_) + [self dispatchEvent:@"CydiaReloadData"]; + else + [self reloadURLWithCache:YES]; } - (void) setButtonImage:(NSString *)button withStyle:(NSString *)style toFunction:(id)function { diff --git a/MobileCydia.mm b/MobileCydia.mm index e29da575..164d2493 100644 --- a/MobileCydia.mm +++ b/MobileCydia.mm @@ -6136,11 +6136,6 @@ bool DepSubstrate(const pkgCache::VerIterator &iterator) { ] autorelease]; } -- (void) unloadData { - [super unloadData]; - [self reloadData]; -} - @end /* }}} */ /* Manage Controller {{{ */