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

View File

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