resolves NPE in QueueListAdapter
This commit is contained in:
parent
8e2b3371e1
commit
d1972ad0e6
|
@ -155,14 +155,19 @@ public class QueueListAdapter extends BaseAdapter {
|
||||||
holder.butSecondary.setTag(item);
|
holder.butSecondary.setTag(item);
|
||||||
holder.butSecondary.setOnClickListener(secondaryActionListener);
|
holder.butSecondary.setOnClickListener(secondaryActionListener);
|
||||||
|
|
||||||
Log.d(TAG, item.getFeed().getImageUri().toString());
|
Uri feedImageUri = item.getFeed().getImageUri();
|
||||||
|
if (feedImageUri != null) {
|
||||||
|
Log.d(TAG, item.getFeed().getImageUri().toString());
|
||||||
|
} else {
|
||||||
|
Log.d(TAG, "Feed has null image uri");
|
||||||
|
}
|
||||||
|
|
||||||
Glide.with(context)
|
Glide.with(context)
|
||||||
.load(item.getImageUri())
|
.load(item.getImageUri())
|
||||||
.diskCacheStrategy(DiskCacheStrategy.SOURCE)
|
.diskCacheStrategy(DiskCacheStrategy.SOURCE)
|
||||||
.fitCenter()
|
.fitCenter()
|
||||||
.dontAnimate()
|
.dontAnimate()
|
||||||
.into(new CoverTarget(item.getFeed().getImageUri(), holder.placeholder, holder.cover));
|
.into(new CoverTarget(feedImageUri, holder.placeholder, holder.cover));
|
||||||
|
|
||||||
return convertView;
|
return convertView;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue