Skip to content

Commit

Permalink
Hopefully made this a bit more readabl. (#823)
Browse files Browse the repository at this point in the history
  • Loading branch information
garrettmoon authored Mar 8, 2018
1 parent 8b4a7cd commit 63e1f4e
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions Source/ASNetworkImageNode.mm
Original file line number Diff line number Diff line change
Expand Up @@ -192,9 +192,10 @@ - (void)setURL:(NSURL *)URL resetToDefault:(BOOL)reset

_URL = URL;

BOOL hasURL = (_URL == nil);
if (reset || hasURL) {
[self _locked_setCurrentImageQuality:(hasURL ? 0.0 : 1.0)];
// If URL is nil and URL was not equal to _URL (checked at the top), then we previously had a URL but it's been nil'd out.
BOOL hadURL = (URL == nil);
if (reset || hadURL) {
[self _locked_setCurrentImageQuality:(hadURL ? 0.0 : 1.0)];
[self _locked__setImage:_defaultImage];
}
}
Expand Down

0 comments on commit 63e1f4e

Please sign in to comment.