From 53fb38da6e19d63145dcf74badcab04cfd522d75 Mon Sep 17 00:00:00 2001 From: "Jay Freeman (saurik)" Date: Sat, 19 Feb 2011 15:59:18 -0800 Subject: [PATCH] Use Metadata_['LastUpdate'] on main thread. --- MobileCydia.mm | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) 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 { -- 2.45.2