mirror of
https://github.com/Docile-Alligator/Infinity-For-Reddit
synced 2024-07-05 17:30:02 +00:00
Additional checks for null or potentially empty array (#1341)
This commit is contained in:
parent
8d0fd823a4
commit
ed738437e6
|
@ -118,7 +118,7 @@ public class PostGalleryTypeImageRecyclerViewAdapter extends RecyclerView.Adapte
|
|||
}
|
||||
|
||||
private void loadImage(ImageViewHolder holder) {
|
||||
if (galleryImages == null) {
|
||||
if (galleryImages == null || galleryImages.isEmpty()) {
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -146,6 +146,10 @@ public class PostGalleryTypeImageRecyclerViewAdapter extends RecyclerView.Adapte
|
|||
}
|
||||
|
||||
private void loadCaptionPreview(ImageViewHolder holder) {
|
||||
if (galleryImages == null || galleryImages.isEmpty()) {
|
||||
return;
|
||||
}
|
||||
|
||||
String previewCaption = galleryImages.get(holder.getBindingAdapterPosition()).caption;
|
||||
String previewCaptionUrl = galleryImages.get(holder.getBindingAdapterPosition()).captionUrl;
|
||||
boolean previewCaptionIsEmpty = TextUtils.isEmpty(previewCaption);
|
||||
|
|
Loading…
Reference in New Issue
Block a user