Use KoreUtil function
This commit is contained in:
parent
71d92c8d1b
commit
243f539439
1 changed files with 4 additions and 8 deletions
|
@ -620,6 +620,7 @@ public final class VideoDetailFragment
|
||||||
binding.detailUploaderRootLayout.setOnClickListener(this);
|
binding.detailUploaderRootLayout.setOnClickListener(this);
|
||||||
binding.detailUploaderRootLayout.setOnLongClickListener(this);
|
binding.detailUploaderRootLayout.setOnLongClickListener(this);
|
||||||
binding.detailThumbnailRootLayout.setOnClickListener(this);
|
binding.detailThumbnailRootLayout.setOnClickListener(this);
|
||||||
|
|
||||||
binding.detailControlsBackground.setOnClickListener(this);
|
binding.detailControlsBackground.setOnClickListener(this);
|
||||||
binding.detailControlsBackground.setOnLongClickListener(this);
|
binding.detailControlsBackground.setOnLongClickListener(this);
|
||||||
binding.detailControlsPopup.setOnClickListener(this);
|
binding.detailControlsPopup.setOnClickListener(this);
|
||||||
|
@ -630,7 +631,8 @@ public final class VideoDetailFragment
|
||||||
binding.detailControlsShare.setOnClickListener(this);
|
binding.detailControlsShare.setOnClickListener(this);
|
||||||
binding.detailControlsOpenInBrowser.setOnClickListener(this);
|
binding.detailControlsOpenInBrowser.setOnClickListener(this);
|
||||||
binding.detailControlsPlayWithKodi.setOnClickListener(this);
|
binding.detailControlsPlayWithKodi.setOnClickListener(this);
|
||||||
showHideKodiButton();
|
binding.detailControlsPlayWithKodi.setVisibility(KoreUtil.shouldShowPlayWithKodi(
|
||||||
|
requireContext(), serviceId) ? View.VISIBLE : View.GONE);
|
||||||
|
|
||||||
binding.overlayThumbnail.setOnClickListener(this);
|
binding.overlayThumbnail.setOnClickListener(this);
|
||||||
binding.overlayThumbnail.setOnLongClickListener(this);
|
binding.overlayThumbnail.setOnLongClickListener(this);
|
||||||
|
@ -707,12 +709,6 @@ public final class VideoDetailFragment
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private void showHideKodiButton() {
|
|
||||||
// show kodi button if it supports the current service and it is enabled in settings
|
|
||||||
binding.detailControlsPlayWithKodi.setVisibility(KoreUtil.shouldShowPlayWithKodi(
|
|
||||||
requireContext(), serviceId) ? View.VISIBLE : View.GONE);
|
|
||||||
}
|
|
||||||
|
|
||||||
/*//////////////////////////////////////////////////////////////////////////
|
/*//////////////////////////////////////////////////////////////////////////
|
||||||
// OwnStack
|
// OwnStack
|
||||||
//////////////////////////////////////////////////////////////////////////*/
|
//////////////////////////////////////////////////////////////////////////*/
|
||||||
|
@ -979,7 +975,7 @@ public final class VideoDetailFragment
|
||||||
if (binding.relatedStreamsLayout == null) { // phone
|
if (binding.relatedStreamsLayout == null) { // phone
|
||||||
pageAdapter.updateItem(RELATED_TAB_TAG,
|
pageAdapter.updateItem(RELATED_TAB_TAG,
|
||||||
RelatedVideosFragment.getInstance(info));
|
RelatedVideosFragment.getInstance(info));
|
||||||
} else { // tablet
|
} else { // tablet + TV
|
||||||
getChildFragmentManager().beginTransaction()
|
getChildFragmentManager().beginTransaction()
|
||||||
.replace(R.id.relatedStreamsLayout,
|
.replace(R.id.relatedStreamsLayout,
|
||||||
RelatedVideosFragment.getInstance(info))
|
RelatedVideosFragment.getInstance(info))
|
||||||
|
|
Loading…
Add table
Reference in a new issue