From 95cd61f0148cda7af3739114e62b9a844dd082e8 Mon Sep 17 00:00:00 2001 From: "Jay Freeman (saurik)" Date: Wed, 29 Oct 2014 11:11:30 -0700 Subject: Force a refresh if suspended for over ten minutes. --- MobileCydia.mm | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'MobileCydia.mm') diff --git a/MobileCydia.mm b/MobileCydia.mm index 21414b6..823d9bd 100644 --- a/MobileCydia.mm +++ b/MobileCydia.mm @@ -9725,6 +9725,19 @@ _end } - (void) applicationWillEnterForeground:(UIApplication *)application { + NSDate *closed = [Metadata_ objectForKey:@"LastClosed"]; + if (closed == nil) + return; + + NSTimeInterval interval([closed timeIntervalSinceNow]); + // XXX: Is 10 minutes the optimal time here? + if (interval > -(10*60)) + return; + + if (!IsReachable("cydia.saurik.com")) + return; + + [tabbar_ beginUpdate]; } - (void) setConfigurationData:(NSString *)data { -- cgit v1.2.3