mirror of
https://github.com/HackPlan/AsyncDisplayKit.git
synced 2026-03-29 08:39: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];
|
||||
|
||||
if (_cacheSupportsSynchronousFetch) {
|
||||
{
|
||||
ASDN::MutexLocker l(_lock);
|
||||
if (_URL && _downloadIdentifier == nil) {
|
||||
UIImage *result = [_cache synchronouslyFetchedCachedImageWithURL:_URL];
|
||||
if (result) {
|
||||
self.image = result;
|
||||
_imageLoaded = YES;
|
||||
}
|
||||
ASDN::MutexLocker l(_lock);
|
||||
if (_imageLoaded == NO && _URL && _downloadIdentifier == nil) {
|
||||
UIImage *result = [_cache synchronouslyFetchedCachedImageWithURL:_URL];
|
||||
if (result) {
|
||||
self.image = result;
|
||||
_imageLoaded = YES;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user