]> git.saurik.com Git - cydia.git/commitdiff
Do not show timestamp for "ancient" recent items.
authorJay Freeman (saurik) <saurik@saurik.com>
Tue, 10 Jun 2014 08:41:17 +0000 (01:41 -0700)
committerJay Freeman (saurik) <saurik@saurik.com>
Tue, 10 Jun 2014 08:41:17 +0000 (01:41 -0700)
MobileCydia.mm

index 0dbc42d15d5f2a930166ebe137343a8d234365bd..804905c30b65ec590c27500fd42e8b22a9b84f02 100644 (file)
@@ -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];