]> git.saurik.com Git - cydia.git/commitdiff
Post CydiaReloadData events, don't actually reload the page.
authorJay Freeman (saurik) <saurik@saurik.com>
Tue, 8 Mar 2011 06:33:29 +0000 (22:33 -0800)
committerJay Freeman (saurik) <saurik@saurik.com>
Tue, 8 Mar 2011 09:50:59 +0000 (01:50 -0800)
CyteKit/WebViewController.h
CyteKit/WebViewController.mm
MobileCydia.mm

index 76bdd82da9859993b18dcbc5da1a870fd1482800..897a204083a85559da02270f5f75f2522aab76dd 100644 (file)
@@ -71,6 +71,7 @@
 
     bool error_;
     _H<NSURLRequest> request_;
+    bool ready_;
 
     _H<NSURLRequest> stage1_;
     _H<NSURLRequest> stage2_;
index 4dc94ef663ec065f4a9e55cdd95b6e20b33cbfa5..4bd05b950cc4ad9e3620400b402db915ea7b15b9 100644 (file)
@@ -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 {
index e29da575adbb850932b29fce7991d43dfb543d55..164d24932d8f618b3e5309e7dd693095f26fe159 100644 (file)
@@ -6136,11 +6136,6 @@ bool DepSubstrate(const pkgCache::VerIterator &iterator) {
     ] autorelease];
 }
 
-- (void) unloadData {
-    [super unloadData];
-    [self reloadData];
-}
-
 @end
 /* }}} */
 /* Manage Controller {{{ */