Better nil url handling
This commit is contained in:
parent
7350e1fa03
commit
65549dec10
|
@ -23,14 +23,12 @@
|
|||
// Remove in progress downloader from queue
|
||||
[manager cancelForDelegate:self];
|
||||
|
||||
if (!url)
|
||||
UIImage *cachedImage = nil;
|
||||
if (url)
|
||||
{
|
||||
self.image = nil;
|
||||
return;
|
||||
cachedImage = [manager imageWithURL:url];
|
||||
}
|
||||
|
||||
UIImage *cachedImage = [manager imageWithURL:url];
|
||||
|
||||
if (cachedImage)
|
||||
{
|
||||
self.image = cachedImage;
|
||||
|
@ -42,8 +40,11 @@
|
|||
self.image = placeholder;
|
||||
}
|
||||
|
||||
if (url)
|
||||
{
|
||||
[manager downloadWithURL:url delegate:self];
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
- (void)cancelCurrentImageLoad
|
||||
|
|
Loading…
Reference in New Issue