Check for blank URL before loading image
This commit is contained in:
parent
027bebd6a9
commit
273ff588d9
|
@ -122,7 +122,7 @@ public class DefaultOnlineFeedViewActivity extends OnlineFeedViewActivity {
|
|||
|
||||
subscribeButton = (Button) header.findViewById(R.id.butSubscribe);
|
||||
|
||||
if (feed.getImage() != null) {
|
||||
if (feed.getImage() != null && StringUtils.isNoneBlank(feed.getImage().getDownload_url())) {
|
||||
PicassoProvider.getDefaultPicassoInstance(this)
|
||||
.load(feed.getImage().getDownload_url())
|
||||
.fit()
|
||||
|
|
|
@ -8,6 +8,8 @@ import android.widget.ArrayAdapter;
|
|||
import android.widget.ImageView;
|
||||
import android.widget.TextView;
|
||||
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import de.danoeh.antennapod.R;
|
||||
|
@ -48,10 +50,12 @@ public class PodcastListAdapter extends ArrayAdapter<GpodnetPodcast> {
|
|||
holder.title.setText(podcast.getTitle());
|
||||
holder.description.setText(podcast.getDescription());
|
||||
|
||||
PicassoProvider.getDefaultPicassoInstance(convertView.getContext())
|
||||
.load(podcast.getLogoUrl())
|
||||
.fit()
|
||||
.into(holder.image);
|
||||
if (StringUtils.isNoneBlank(podcast.getLogoUrl())) {
|
||||
PicassoProvider.getDefaultPicassoInstance(convertView.getContext())
|
||||
.load(podcast.getLogoUrl())
|
||||
.fit()
|
||||
.into(holder.image);
|
||||
}
|
||||
|
||||
return convertView;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue