mirror of
https://codeberg.org/Bazsalanszky/Infinity-For-Lemmy.git
synced 2025-01-28 18:44:44 +01:00
Version 5.4.0. Minor bugs fixed in PostGalleryTypeImageRecyclerViewAdapter.
This commit is contained in:
parent
c7882b1f65
commit
e88c2e957b
@ -8,8 +8,8 @@ android {
|
|||||||
applicationId "ml.docilealligator.infinityforreddit"
|
applicationId "ml.docilealligator.infinityforreddit"
|
||||||
minSdk 21
|
minSdk 21
|
||||||
targetSdk 33
|
targetSdk 33
|
||||||
versionCode 113
|
versionCode 114
|
||||||
versionName "5.4.0-beta4"
|
versionName "5.4.0"
|
||||||
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
|
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
|
||||||
javaCompileOptions {
|
javaCompileOptions {
|
||||||
annotationProcessorOptions {
|
annotationProcessorOptions {
|
||||||
|
@ -123,8 +123,12 @@ public class PostGalleryTypeImageRecyclerViewAdapter extends RecyclerView.Adapte
|
|||||||
if (galleryImages == null || galleryImages.isEmpty()) {
|
if (galleryImages == null || galleryImages.isEmpty()) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
int index = holder.getBindingAdapterPosition();
|
||||||
|
if (index < 0 || index >= galleryImages.size()) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
RequestBuilder<Drawable> imageRequestBuilder = glide.load(galleryImages.get(holder.getBindingAdapterPosition()).url).listener(new RequestListener<>() {
|
RequestBuilder<Drawable> imageRequestBuilder = glide.load(galleryImages.get(index).url).listener(new RequestListener<>() {
|
||||||
@Override
|
@Override
|
||||||
public boolean onLoadFailed(@Nullable GlideException e, Object model, Target<Drawable> target, boolean isFirstResource) {
|
public boolean onLoadFailed(@Nullable GlideException e, Object model, Target<Drawable> target, boolean isFirstResource) {
|
||||||
holder.binding.progressBarItemGalleryImageInPostFeed.setVisibility(View.GONE);
|
holder.binding.progressBarItemGalleryImageInPostFeed.setVisibility(View.GONE);
|
||||||
@ -152,8 +156,13 @@ public class PostGalleryTypeImageRecyclerViewAdapter extends RecyclerView.Adapte
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
String previewCaption = galleryImages.get(holder.getBindingAdapterPosition()).caption;
|
int index = holder.getBindingAdapterPosition();
|
||||||
String previewCaptionUrl = galleryImages.get(holder.getBindingAdapterPosition()).captionUrl;
|
if (index < 0 || index >= galleryImages.size()) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
String previewCaption = galleryImages.get(index).caption;
|
||||||
|
String previewCaptionUrl = galleryImages.get(index).captionUrl;
|
||||||
boolean previewCaptionIsEmpty = TextUtils.isEmpty(previewCaption);
|
boolean previewCaptionIsEmpty = TextUtils.isEmpty(previewCaption);
|
||||||
boolean previewCaptionUrlIsEmpty = TextUtils.isEmpty(previewCaptionUrl);
|
boolean previewCaptionUrlIsEmpty = TextUtils.isEmpty(previewCaptionUrl);
|
||||||
if (!previewCaptionIsEmpty || !previewCaptionUrlIsEmpty) {
|
if (!previewCaptionIsEmpty || !previewCaptionUrlIsEmpty) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user