Fix NPE and hide progress bar without media
This commit is contained in:
parent
e98041c7ba
commit
69303a5915
|
@ -122,7 +122,11 @@ public class NewEpisodesListAdapter extends BaseAdapter {
|
||||||
holder.downloadProgress.setProgress(itemAccess.getItemDownloadProgressPercent(item));
|
holder.downloadProgress.setProgress(itemAccess.getItemDownloadProgressPercent(item));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
} else {
|
||||||
|
holder.downloadProgress.setVisibility(View.GONE);
|
||||||
|
holder.txtvDuration.setVisibility(View.GONE);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (itemAccess.isInQueue(item)) {
|
if (itemAccess.isInQueue(item)) {
|
||||||
holder.queueStatus.setVisibility(View.VISIBLE);
|
holder.queueStatus.setVisibility(View.VISIBLE);
|
||||||
} else {
|
} else {
|
||||||
|
|
|
@ -318,7 +318,7 @@ public class FeedItem extends FeedComponent implements ShownotesProvider, Flattr
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public Uri getImageUri() {
|
public Uri getImageUri() {
|
||||||
if(media.hasEmbeddedPicture()) {
|
if(media != null && media.hasEmbeddedPicture()) {
|
||||||
return media.getImageUri();
|
return media.getImageUri();
|
||||||
} else if (hasItemImageDownloaded()) {
|
} else if (hasItemImageDownloaded()) {
|
||||||
return image.getImageUri();
|
return image.getImageUri();
|
||||||
|
|
Loading…
Reference in New Issue