[ASMultiplexImageNode] Copy recent changes made to ASNetworkImageNode for progress image handling

This commit is contained in:
Adlai Holler
2016-04-12 14:34:11 -07:00
parent 362c41ae80
commit 0022cad000
2 changed files with 33 additions and 29 deletions

View File

@@ -212,6 +212,7 @@ static const CGSize kMinReleaseImageOnBackgroundSize = {20.0, 20.0};
- (void)visibilityDidChange:(BOOL)isVisible
{
[super visibilityDidChange:isVisible];
ASDN::MutexLocker l(_lock);
if (_downloaderImplementsSetPriority) {
if (_downloadIdentifier != nil) {
@@ -388,7 +389,7 @@ static const CGSize kMinReleaseImageOnBackgroundSize = {20.0, 20.0};
ASDN::MutexLocker l(strongSelf->_lock);
//Getting a result back for a different download identifier, download must not have been successfully canceled
if (downloadIdentifier != nil && !ASObjectIsEqual(strongSelf->_downloadIdentifier, downloadIdentifier)) {
if (ASObjectIsEqual(strongSelf->_downloadIdentifier, downloadIdentifier) == NO && downloadIdentifier != nil) {
return;
}