summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJay Freeman (saurik) <saurik@saurik.com>2014-06-10 01:41:17 -0700
committerJay Freeman (saurik) <saurik@saurik.com>2014-06-10 01:41:17 -0700
commit0cadb3529348074146a4b89605601815afead5cb (patch)
treeb51b9bdddfecc46fa51fbe607e76d13a26d1226c
parent1db5920d9488c25bb51e37d504d51f6a41ae5432 (diff)
Do not show timestamp for "ancient" recent items.
-rw-r--r--MobileCydia.mm13
1 files changed, 10 insertions, 3 deletions
diff --git a/MobileCydia.mm b/MobileCydia.mm
index 0dbc42d..804905c 100644
--- a/MobileCydia.mm
+++ b/MobileCydia.mm
@@ -8000,14 +8000,21 @@ static void HomeControllerReachabilityCallback(SCNetworkReachabilityRef reachabi
Package *package([packages objectAtIndex:offset]);
time_t upgraded([package upgraded]);
- upgraded -= upgraded % (60 * 60 * 24);
+ if (upgraded < 1168364520)
+ upgraded = 0;
+ else
+ upgraded -= upgraded % (60 * 60 * 24);
if (section == nil || upgraded != last) {
last = upgraded;
NSString *name;
- name = (NSString *) CFDateFormatterCreateStringWithDate(NULL, formatter, (CFDateRef) [NSDate dateWithTimeIntervalSince1970:upgraded]);
- [name autorelease];
+ if (upgraded == 0)
+ continue; // XXX: name = UCLocalize("...");
+ else {
+ name = (NSString *) CFDateFormatterCreateStringWithDate(NULL, formatter, (CFDateRef) [NSDate dateWithTimeIntervalSince1970:upgraded]);
+ [name autorelease];
+ }
section = [[[Section alloc] initWithName:name row:offset localize:NO] autorelease];
[sections addObject:section];