Commit d32f05df authored by Thomas's avatar Thomas
Browse files

Fix an issue with PixelFed

parent b035fb96
......@@ -553,11 +553,11 @@ public class PixelfedListAdapter extends RecyclerView.Adapter implements OnPostA
} else if (status.getMedia_attachments() != null) {
holder.art_media.setVisibility(View.VISIBLE);
holder.imageSlider.setVisibility(View.GONE);
if (status.getMedia_attachments().get(0).getType().toLowerCase().equals("video")) {
if (status.getMedia_attachments().get(0).getType() != null && status.getMedia_attachments().get(0).getType().toLowerCase().equals("video")) {
holder.art_media_play.setVisibility(View.VISIBLE);
}
String url;
if (status.getMedia_attachments().get(0).getPreview_url().endsWith("no-preview.png")) {
if (status.getMedia_attachments().get(0).getPreview_url() != null && status.getMedia_attachments().get(0).getPreview_url().endsWith("no-preview.png")) {
url = status.getMedia_attachments().get(0).getUrl();
} else {
url = status.getMedia_attachments().get(0).getPreview_url();
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment