mirror of
https://github.com/HackPlan/AsyncDisplayKit.git
synced 2026-04-29 20:26:00 +08:00
Remove extraneous brackets, check _imageLoaded before doing work
This commit is contained in:
@@ -173,14 +173,12 @@ static const CGSize kMinReleaseImageOnBackgroundSize = {20.0, 20.0};
|
|||||||
[super displayWillStart];
|
[super displayWillStart];
|
||||||
|
|
||||||
if (_cacheSupportsSynchronousFetch) {
|
if (_cacheSupportsSynchronousFetch) {
|
||||||
{
|
ASDN::MutexLocker l(_lock);
|
||||||
ASDN::MutexLocker l(_lock);
|
if (_imageLoaded == NO && _URL && _downloadIdentifier == nil) {
|
||||||
if (_URL && _downloadIdentifier == nil) {
|
UIImage *result = [_cache synchronouslyFetchedCachedImageWithURL:_URL];
|
||||||
UIImage *result = [_cache synchronouslyFetchedCachedImageWithURL:_URL];
|
if (result) {
|
||||||
if (result) {
|
self.image = result;
|
||||||
self.image = result;
|
_imageLoaded = YES;
|
||||||
_imageLoaded = YES;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user