From 888667d540945078e5c1638c157057ed0154acb5 Mon Sep 17 00:00:00 2001 From: "Jay Freeman (saurik)" Date: Wed, 29 Oct 2014 20:11:45 -0700 Subject: Unify intervals for foregrounding with launching. --- MobileCydia.mm | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) diff --git a/MobileCydia.mm b/MobileCydia.mm index 4e62734..68bd2b2 100644 --- a/MobileCydia.mm +++ b/MobileCydia.mm @@ -9731,15 +9731,18 @@ _end return; NSTimeInterval interval([closed timeIntervalSinceNow]); - // XXX: Is 10 minutes the optimal time here? - if (interval > -(10*60)) - return; - if (!IsReachable("cydia.saurik.com")) - return; + if (interval <= -(30)) { + [tabbar_ setSelectedIndex:0]; + [[[tabbar_ viewControllers] objectAtIndex:0] popToRootViewControllerAnimated:NO]; + } - [tabbar_ beginUpdate]; - [appcache_ reloadURLWithCache:YES]; + if (interval <= -(15)) { + if (IsReachable("cydia.saurik.com")) { + [tabbar_ beginUpdate]; + [appcache_ reloadURLWithCache:YES]; + } + } } - (void) setConfigurationData:(NSString *)data { -- cgit v1.2.3