]> git.saurik.com Git - cydia.git/commitdiff
Use Metadata_['LastUpdate'] on main thread.
authorJay Freeman (saurik) <saurik@saurik.com>
Sat, 19 Feb 2011 23:59:18 +0000 (15:59 -0800)
committerJay Freeman (saurik) <saurik@saurik.com>
Sun, 20 Feb 2011 01:01:06 +0000 (17:01 -0800)
MobileCydia.mm

index 70ef1b75dabf1b3cc071836dbae9f4211ca29156..8da8f280f3a22314221350bd2bc31a2e34165f86 100644 (file)
@@ -8785,11 +8785,10 @@ bool DepSubstrate(const pkgCache::VerIterator &iterator) {
     [[navigation tabBarItem] setBadgeValue:(Queuing_ ? UCLocalize("Q_D") : nil)];
 }
 
     [[navigation tabBarItem] setBadgeValue:(Queuing_ ? UCLocalize("Q_D") : nil)];
 }
 
-- (void) _refreshIfPossible {
+- (void) _refreshIfPossible:(NSDate *)update {
     NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init];
 
     bool recently = false;
     NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init];
 
     bool recently = false;
-    NSDate *update([Metadata_ objectForKey:@"LastUpdate"]);
     if (update != nil) {
         NSTimeInterval interval([update timeIntervalSinceNow]);
         if (interval <= 0 && interval > -(15*60))
     if (update != nil) {
         NSTimeInterval interval([update timeIntervalSinceNow]);
         if (interval <= 0 && interval > -(15*60))
@@ -8837,7 +8836,7 @@ bool DepSubstrate(const pkgCache::VerIterator &iterator) {
 }
 
 - (void) refreshIfPossible {
 }
 
 - (void) refreshIfPossible {
-    [NSThread detachNewThreadSelector:@selector(_refreshIfPossible) toTarget:self withObject:nil];
+    [NSThread detachNewThreadSelector:@selector(_refreshIfPossible:) toTarget:self withObject:[Metadata_ objectForKey:@"LastUpdate"]];
 }
 
 - (void) _reloadDataWithInvocation:(NSInvocation *)invocation {
 }
 
 - (void) _reloadDataWithInvocation:(NSInvocation *)invocation {