diff options
author | Jay Freeman (saurik) <saurik@saurik.com> | 2011-02-19 15:59:18 -0800 |
---|---|---|
committer | Jay Freeman (saurik) <saurik@saurik.com> | 2011-02-19 17:01:06 -0800 |
commit | 53fb38da6e19d63145dcf74badcab04cfd522d75 (patch) | |
tree | 8972b5d567ad81f74f2a6f911c891c1b0d3f6882 /MobileCydia.mm | |
parent | d3b96710c3ee5a845837b49864ddad6f2f8f6a8b (diff) |
Use Metadata_['LastUpdate'] on main thread.
Diffstat (limited to 'MobileCydia.mm')
-rw-r--r-- | MobileCydia.mm | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/MobileCydia.mm b/MobileCydia.mm index 70ef1b7..8da8f28 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 { |