summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--MobileCydia.mm13
1 files changed, 13 insertions, 0 deletions
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 {