fix NPE in ItemFragment. fixes AntennaPod/AntennaPod#1339
This commit is contained in:
parent
3b003c60ab
commit
0ef38407e3
|
@ -324,8 +324,16 @@ public class ItemFragment extends Fragment {
|
|||
}
|
||||
|
||||
private void updateAppearance() {
|
||||
if (item == null) {
|
||||
Log.d(TAG, "updateAppearance item is null");
|
||||
return;
|
||||
}
|
||||
|
||||
txtvTitle.setText(item.getTitle());
|
||||
txtvPublished.setText(DateUtils.formatDateTime(getActivity(), item.getPubDate().getTime(), DateUtils.FORMAT_ABBREV_ALL));
|
||||
|
||||
if (item.getPubDate() != null) {
|
||||
txtvPublished.setText(DateUtils.formatDateTime(getActivity(), item.getPubDate().getTime(), DateUtils.FORMAT_ABBREV_ALL));
|
||||
}
|
||||
|
||||
Glide.with(getActivity())
|
||||
.load(item.getImageUri())
|
||||
|
|
Loading…
Reference in New Issue