Skip to content

Commit

Permalink
Dev
Browse files Browse the repository at this point in the history
  • Loading branch information
Yuriy Budiyev committed Nov 8, 2017
1 parent 7d5764b commit ae43ea2
Showing 1 changed file with 17 additions and 15 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -144,23 +144,25 @@ private void loadImage() {
image = storageCache.get(key);
}
Context context = mContext;
if (image == null) {
try {
image = mBitmapLoader.load(context, data);
} catch (Throwable error) {
ErrorCallback<T> errorCallback = mErrorCallback;
if (errorCallback != null) {
errorCallback.onError(context, data, error);
}
return;
if (image != null) {
notifyImageLoaded(context, data, image);
return;
}
try {
image = mBitmapLoader.load(context, data);
} catch (Throwable error) {
ErrorCallback<T> errorCallback = mErrorCallback;
if (errorCallback != null) {
errorCallback.onError(context, data, error);
}
if (image == null) {
ErrorCallback<T> errorCallback = mErrorCallback;
if (errorCallback != null) {
errorCallback.onError(context, data, new ImageNotLoadedException());
}
return;
return;
}
if (image == null) {
ErrorCallback<T> errorCallback = mErrorCallback;
if (errorCallback != null) {
errorCallback.onError(context, data, new ImageNotLoadedException());
}
return;
}
if (mCancelled) {
return;
Expand Down

0 comments on commit ae43ea2

Please sign in to comment.