distinguish between recording in stream for progress

This commit is contained in:
Felix 2017-04-15 20:01:19 +02:00
parent 9eb1829bf5
commit 5ad489d69d

View file

@ -167,10 +167,14 @@ public class OverlayFragment extends PlaybackFragment{
ps.addClassPresenter(ListRow.class, new ListRowPresenter());
mRowsAdapter = new ArrayObjectAdapter(ps);
mRowsAdapter.add(controlsRow);
if(eventType == DetailsActivity.TYPE_RECORDING){
if(mSelectedEvent.getMetadata() != null && mSelectedEvent.getMetadata().getRelated() != null){
mRowsAdapter.add(getRelatedItems());
setOnItemViewClickedListener(new ItemViewClickedListener(this));
}
} else if(eventType == DetailsActivity.TYPE_STREAM){
// TODO add other streams as related events
}
setAdapter(mRowsAdapter);
if(mCallback != null && eventType == DetailsActivity.TYPE_STREAM){
@ -237,16 +241,20 @@ public class OverlayFragment extends PlaybackFragment{
}
public int getCurrentPosition() {
if(eventType == DetailsActivity.TYPE_RECORDING){
if(mCallback != null){
return (int) mCallback.getCurrentPosition();
}
}
return 0;
}
private long getCurrentPositionLong(){
if(eventType == DetailsActivity.TYPE_RECORDING){
if(mCallback != null){
return mCallback.getCurrentPosition();
}
}
return 0;
}