Skip to content

Commit

Permalink
Set URL from URL request so caching works
Browse files Browse the repository at this point in the history
  • Loading branch information
thillerson committed Sep 9, 2012
1 parent 10783e1 commit 4a67129
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion Core/Source/DTLazyImageView.m
Expand Up @@ -72,7 +72,7 @@ - (void)didMoveToSuperview
{
[super didMoveToSuperview];

if (!self.image && _url && !_connection && self.superview)
if (!self.image && (_url || _urlRequest) && !_connection && self.superview)
{
UIImage *image = [_imageCache objectForKey:_url];

Expand Down Expand Up @@ -284,4 +284,9 @@ - (void)connection:(NSURLConnection *)connection didFailWithError:(NSError *)err
@synthesize shouldShowProgressiveDownload;
@synthesize urlRequest = _urlRequest;

- (void) setUrlRequest:(NSMutableURLRequest *)request {
_urlRequest = request;
self.url = [_urlRequest URL];
}

@end

0 comments on commit 4a67129

Please sign in to comment.