From: Jay Freeman (saurik) Date: Sat, 19 Feb 2011 23:59:18 +0000 (-0800) Subject: Use Metadata_['LastUpdate'] on main thread. X-Git-Tag: v1.1.0%b1~284 X-Git-Url: https://git.saurik.com/cydia.git/commitdiff_plain/53fb38da6e19d63145dcf74badcab04cfd522d75 Use Metadata_['LastUpdate'] on main thread. --- diff --git a/MobileCydia.mm b/MobileCydia.mm index 70ef1b75..8da8f280 100644 --- a/MobileCydia.mm +++ b/MobileCydia.mm @@ -8785,11 +8785,10 @@ bool DepSubstrate(const pkgCache::VerIterator &iterator) { [[navigation tabBarItem] setBadgeValue:(Queuing_ ? UCLocalize("Q_D") : nil)]; } -- (void) _refreshIfPossible { +- (void) _refreshIfPossible:(NSDate *)update { 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)) @@ -8837,7 +8836,7 @@ bool DepSubstrate(const pkgCache::VerIterator &iterator) { } - (void) refreshIfPossible { - [NSThread detachNewThreadSelector:@selector(_refreshIfPossible) toTarget:self withObject:nil]; + [NSThread detachNewThreadSelector:@selector(_refreshIfPossible:) toTarget:self withObject:[Metadata_ objectForKey:@"LastUpdate"]]; } - (void) _reloadDataWithInvocation:(NSInvocation *)invocation {