Skip to content

Commit

Permalink
Dev
Browse files Browse the repository at this point in the history
  • Loading branch information
yuriy-budiyev committed Mar 1, 2018
1 parent 064114f commit 4dfe552
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -76,15 +76,12 @@ public boolean hasSameKey(@Nullable String key) {

@Override
protected void onImageLoaded(@NonNull Bitmap image) {
if (mView.get() == null || mResources.get() == null) {
return;
}
mMainThreadHandler.post(new SetImageAction(image));
}

@Override
protected void onError(@NonNull Throwable error) {
if (mErrorDrawable != null || !isCancelled()) {
if (mErrorDrawable != null) {
mMainThreadHandler.post(new SetErrorDrawableAction());
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -338,7 +338,7 @@ public void load(@NonNull View view) {
}
DisplayImageAction<?> currentAction = InternalUtils.getDisplayImageAction(view);
if (currentAction != null) {
if (currentAction.hasSameKey(key) && !currentAction.isCancelled()) {
if (currentAction.hasSameKey(key)) {
return;
}
currentAction.cancel();
Expand Down

0 comments on commit 4dfe552

Please sign in to comment.