summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJay Freeman (saurik) <saurik@saurik.com>2014-10-29 11:23:11 -0700
committerJay Freeman (saurik) <saurik@saurik.com>2014-10-29 11:23:11 -0700
commitfedd38feb88ac93531aad19ab217e7d61b17f7b9 (patch)
tree8c0f5421d855e2e1bf9b17c3d036c232e634a95f
parent95cd61f0148cda7af3739114e62b9a844dd082e8 (diff)
Reload the appcache if suspended over ten minutes.
-rw-r--r--CyteKit/WebViewController.h1
-rw-r--r--MobileCydia.mm5
2 files changed, 5 insertions, 1 deletions
diff --git a/CyteKit/WebViewController.h b/CyteKit/WebViewController.h
index a159f37..96186c1 100644
--- a/CyteKit/WebViewController.h
+++ b/CyteKit/WebViewController.h
@@ -103,6 +103,7 @@
- (id) initWithWidth:(float)width ofClass:(Class)_class;
- (void) callFunction:(WebScriptObject *)function;
+- (void) reloadURLWithCache:(BOOL)cache;
- (void) webView:(WebView *)view didClearWindowObject:(WebScriptObject *)window forFrame:(WebFrame *)frame;
- (NSURLRequest *) webView:(WebView *)view resource:(id)identifier willSendRequest:(NSURLRequest *)request redirectResponse:(NSURLResponse *)response fromDataSource:(WebDataSource *)source;
diff --git a/MobileCydia.mm b/MobileCydia.mm
index 823d9bd..4e62734 100644
--- a/MobileCydia.mm
+++ b/MobileCydia.mm
@@ -8930,6 +8930,7 @@ static void HomeControllerReachabilityCallback(SCNetworkReachabilityRef reachabi
_H<UIWindow> window_;
_H<CydiaTabBarController> tabbar_;
_H<CyteTabBarController> emulated_;
+ _H<AppCacheController> appcache_;
_H<NSMutableArray> essential_;
_H<NSMutableArray> broken_;
@@ -9738,6 +9739,7 @@ _end
return;
[tabbar_ beginUpdate];
+ [appcache_ reloadURLWithCache:YES];
}
- (void) setConfigurationData:(NSString *)data {
@@ -9884,7 +9886,8 @@ _trace();
broken_ = [NSMutableArray arrayWithCapacity:4];
// XXX: I really need this thing... like, seriously... I'm sorry
- [[[AppCacheController alloc] initWithURL:[NSURL URLWithString:[NSString stringWithFormat:@"%@/appcache/", UI_]]] reloadData];
+ appcache_ = [[[AppCacheController alloc] initWithURL:[NSURL URLWithString:[NSString stringWithFormat:@"%@/appcache/", UI_]]] autorelease];
+ [appcache_ reloadData];
window_ = [[[UIWindow alloc] initWithFrame:[[UIScreen mainScreen] bounds]] autorelease];
[window_ orderFront:self];