From: Jay Freeman (saurik) Date: Mon, 7 Mar 2011 17:19:20 +0000 (-0800) Subject: Cache results of CydiaIcon.png requests. X-Git-Tag: v1.1.0%b1~21 X-Git-Url: https://git.saurik.com/cydia.git/commitdiff_plain/e2add7b8216598e30a3fcfb99abda07736e3828e Cache results of CydiaIcon.png requests. --- diff --git a/MobileCydia.mm b/MobileCydia.mm index ae3fc4cb..27609772 100644 --- a/MobileCydia.mm +++ b/MobileCydia.mm @@ -7669,7 +7669,16 @@ bool DepSubstrate(const pkgCache::VerIterator &iterator) { if ([base length] != 0) { NSURL *url([NSURL URLWithString:[base stringByAppendingString:@"CydiaIcon.png"]]); - if (NSData *data = [NSData dataWithContentsOfURL:url]) + if (NSData *data = [NSURLConnection + sendSynchronousRequest:[NSURLRequest + requestWithURL:url + //cachePolicy:NSURLRequestUseProtocolCachePolicy + //timeoutInterval:5 + ] + + returningResponse:NULL + error:NULL + ]) if (UIImage *image = [UIImage imageWithData:data]) [self performSelectorOnMainThread:@selector(_setImage:) withObject:image waitUntilDone:NO]; }