From: Jay Freeman (saurik) Date: Thu, 30 Oct 2014 03:11:45 +0000 (-0700) Subject: Unify intervals for foregrounding with launching. X-Git-Tag: v1.1.14~14 X-Git-Url: https://git.saurik.com/cydia.git/commitdiff_plain/888667d540945078e5c1638c157057ed0154acb5 Unify intervals for foregrounding with launching. --- diff --git a/MobileCydia.mm b/MobileCydia.mm index 4e627343..68bd2b28 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 {