From e2add7b8216598e30a3fcfb99abda07736e3828e Mon Sep 17 00:00:00 2001 From: "Jay Freeman (saurik)" Date: Mon, 7 Mar 2011 09:19:20 -0800 Subject: Cache results of CydiaIcon.png requests. --- MobileCydia.mm | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/MobileCydia.mm b/MobileCydia.mm index ae3fc4c..2760977 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]; } -- cgit v1.2.3