Code review changes

This commit is contained in:
Morgan Pretty 2023-02-14 14:10:47 +11:00
parent bbedad5ebb
commit 4df530d341
2 changed files with 16 additions and 8 deletions

View File

@ -30,8 +30,10 @@ public class GlideBitmapListeningTarget extends BitmapImageViewTarget {
super.setResource(resource);
loaded.set(true);
if (loadingView.get() != null) {
loadingView.get().setVisibility(View.GONE);
View loadingViewInstance = loadingView.get();
if (loadingViewInstance != null) {
loadingViewInstance.setVisibility(View.GONE);
}
}
@ -40,8 +42,10 @@ public class GlideBitmapListeningTarget extends BitmapImageViewTarget {
super.onLoadFailed(errorDrawable);
loaded.set(true);
if (loadingView.get() != null) {
loadingView.get().setVisibility(View.GONE);
View loadingViewInstance = loadingView.get();
if (loadingViewInstance != null) {
loadingViewInstance.setVisibility(View.GONE);
}
}
}

View File

@ -29,8 +29,10 @@ public class GlideDrawableListeningTarget extends DrawableImageViewTarget {
super.setResource(resource);
loaded.set(true);
if (loadingView.get() != null) {
loadingView.get().setVisibility(View.GONE);
View loadingViewInstance = loadingView.get();
if (loadingViewInstance != null) {
loadingViewInstance.setVisibility(View.GONE);
}
}
@ -39,8 +41,10 @@ public class GlideDrawableListeningTarget extends DrawableImageViewTarget {
super.onLoadFailed(errorDrawable);
loaded.set(true);
if (loadingView.get() != null) {
loadingView.get().setVisibility(View.GONE);
View loadingViewInstance = loadingView.get();
if (loadingViewInstance != null) {
loadingViewInstance.setVisibility(View.GONE);
}
}
}