You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Feb 2, 2023. It is now read-only.
Copy file name to clipboardExpand all lines: AsyncDisplayKit/ASNetworkImageNode.mm
+16-29Lines changed: 16 additions & 29 deletions
Original file line number
Diff line number
Diff line change
@@ -121,31 +121,19 @@ - (void)dealloc
121
121
122
122
/// Setter for public image property. It has the side effect to set an internal _imageWasSetExternally that prevents setting an image internally. Setting an image internally should happen with the _setImage: method
123
123
- (void)setImage:(UIImage *)image
124
-
{
125
-
__instanceLock__.lock();
126
-
_imageWasSetExternally = (image != nil);
127
-
if (_imageWasSetExternally) {
128
-
[self__cancelDownloadAndClearImage];
129
-
}
130
-
__instanceLock__.unlock();
131
-
132
-
[self__setImage:image];
133
-
}
134
-
135
-
/// Internal image setter that will first check if an image already was set externally and will return otherwise will set it
136
-
- (void)_setImage:(UIImage *)image
137
124
{
138
125
__instanceLock__.lock();
139
126
140
127
#ifdef DEBUG
141
128
if (_URL != nil) {
142
-
NSLog(@"Setting the image directly on an %@ and setting an URL is not supported. If you decide to set an image direclty this node will work the same ways as an plain ASImageNode and not consider the image loaded via URL.", NSStringFromClass([selfclass]));
129
+
NSLog(@"Setting the image directly on an %@ and setting and setting an URL is not supported. If you want to use a placeholder image please use defaultImage .", NSStringFromClass([selfclass]));
NSLog(@"Setting the image directly on an %@ and setting an URL is not supported. If you decide to set an image direclty this node will work the same ways as an plain ASImageNode and not consider the image loaded via URL.", NSStringFromClass([selfclass]));
154
+
NSLog(@"Setting the image directly on an %@ and setting and setting an URL is not supported. If you want to use a placeholder image please use defaultImage .", NSStringFromClass([selfclass]));
167
155
}
168
156
#endif
157
+
_imageWasSetExternally = NO;
169
158
170
-
if (ASObjectIsEqual(URL, _URL) || _imageWasSetExternally) {
0 commit comments