Fix remote image issue with Pixelfed (count > 1)

This commit is contained in:
tom79 2019-10-01 17:39:17 +02:00
parent 51cc404b25
commit 480c05c4c9
1 changed files with 7 additions and 2 deletions

View File

@ -90,9 +90,14 @@ public class SliderAdapter extends SliderViewAdapter<SliderAdapter.SliderAdapter
}else{
viewHolder.delete_media.setVisibility(View.GONE);
}
String url;
if(attachments.get(position).getPreview_url().endsWith("no-preview.png") ){
url = attachments.get(position).getUrl();
}else{
url = attachments.get(position).getPreview_url();
}
Glide.with(viewHolder.imageViewBackground.getContext())
.load(attachments.get(position).getPreview_url())
.load(url)
.into(viewHolder.imageViewBackground);
viewHolder.imageViewBackground.setContentDescription(attachments.get(position).getDescription());
if( !this.canDelete) {