mirror of
https://codeberg.org/Bazsalanszky/Infinity-For-Lemmy.git
synced 2024-12-28 11:58:23 +01: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) {
|
private void loadImage(ImageViewHolder holder) {
|
||||||
if (galleryImages == null) {
|
if (galleryImages == null || galleryImages.isEmpty()) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -146,6 +146,10 @@ public class PostGalleryTypeImageRecyclerViewAdapter extends RecyclerView.Adapte
|
|||||||
}
|
}
|
||||||
|
|
||||||
private void loadCaptionPreview(ImageViewHolder holder) {
|
private void loadCaptionPreview(ImageViewHolder holder) {
|
||||||
|
if (galleryImages == null || galleryImages.isEmpty()) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
String previewCaption = galleryImages.get(holder.getBindingAdapterPosition()).caption;
|
String previewCaption = galleryImages.get(holder.getBindingAdapterPosition()).caption;
|
||||||
String previewCaptionUrl = galleryImages.get(holder.getBindingAdapterPosition()).captionUrl;
|
String previewCaptionUrl = galleryImages.get(holder.getBindingAdapterPosition()).captionUrl;
|
||||||
boolean previewCaptionIsEmpty = TextUtils.isEmpty(previewCaption);
|
boolean previewCaptionIsEmpty = TextUtils.isEmpty(previewCaption);
|
||||||
|
Loading…
Reference in New Issue
Block a user