fixed related videos nullpointer exception
This commit is contained in:
parent
abfdcea4db
commit
931f34d2fd
|
@ -145,12 +145,8 @@ public class VideoItemDetailFragment extends Fragment {
|
||||||
|
|
||||||
progressBar.setVisibility(View.GONE);
|
progressBar.setVisibility(View.GONE);
|
||||||
if(info.next_video != null) {
|
if(info.next_video != null) {
|
||||||
infoItemBuilder.setOnItemSelectedListener(new InfoItemBuilder.OnItemSelectedListener() {
|
// todo: activate this function or remove it
|
||||||
@Override
|
nextStreamView.setVisibility(View.GONE);
|
||||||
public void selected(String url) {
|
|
||||||
openStreamUrl(url);
|
|
||||||
}
|
|
||||||
});
|
|
||||||
} else {
|
} else {
|
||||||
nextStreamView.setVisibility(View.GONE);
|
nextStreamView.setVisibility(View.GONE);
|
||||||
activity.findViewById(R.id.detail_similar_title).setVisibility(View.GONE);
|
activity.findViewById(R.id.detail_similar_title).setVisibility(View.GONE);
|
||||||
|
@ -522,6 +518,12 @@ public class VideoItemDetailFragment extends Fragment {
|
||||||
for (final StreamPreviewInfo item : info.related_streams) {
|
for (final StreamPreviewInfo item : info.related_streams) {
|
||||||
similarLayout.addView(infoItemBuilder.buildView(similarLayout, item));
|
similarLayout.addView(infoItemBuilder.buildView(similarLayout, item));
|
||||||
}
|
}
|
||||||
|
infoItemBuilder.setOnItemSelectedListener(new InfoItemBuilder.OnItemSelectedListener() {
|
||||||
|
@Override
|
||||||
|
public void selected(String url) {
|
||||||
|
openStreamUrl(url);
|
||||||
|
}
|
||||||
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
private void onErrorBlockedByGema() {
|
private void onErrorBlockedByGema() {
|
||||||
|
|
Loading…
Reference in New Issue