Add support for enclosure images

This commit is contained in:
Shinokuni 2019-05-17 13:29:50 +02:00
parent 1302d8306d
commit 38179d0110
2 changed files with 6 additions and 1 deletions

View File

@ -22,6 +22,8 @@ public final class ItemMatcher {
DateTimeZone.getDefault()));
item.setContent(nextNewsItem.getBody());
if (Utils.isTypeImage(nextNewsItem.getEnclosureMime()))
item.setImageLink(nextNewsItem.getEnclosureLink());
item.setLink(nextNewsItem.getUrl());
item.setGuid(nextNewsItem.getGuid());

View File

@ -316,8 +316,11 @@ public class MainItemListAdapter extends PagedListAdapter<ItemWithFeed, MainItem
if (item.getCleanDescription() != null) {
itemDescription.setVisibility(View.VISIBLE);
itemDescription.setText(item.getCleanDescription());
} else
} else {
itemDescription.setVisibility(View.GONE);
if (itemWithFeed.getItem().hasImage())
itemTitle.setMaxLines(4);
}
}
private void setReadState(boolean isRead) {