mirror of
https://github.com/libre-tube/LibreTube.git
synced 2025-04-29 00:10:32 +05:30
fix: related streams are not visible in landscape layout
This commit is contained in:
parent
d5241c97a5
commit
3ca65b1091
@ -596,7 +596,8 @@ class PlayerFragment : Fragment(), OnlinePlayerOptions {
|
|||||||
|
|
||||||
binding.relatedRecView.layoutManager = LinearLayoutManager(
|
binding.relatedRecView.layoutManager = LinearLayoutManager(
|
||||||
context,
|
context,
|
||||||
LinearLayoutManager.HORIZONTAL,
|
if (resources.configuration.orientation == Configuration.ORIENTATION_PORTRAIT)
|
||||||
|
LinearLayoutManager.HORIZONTAL else LinearLayoutManager.VERTICAL,
|
||||||
false
|
false
|
||||||
)
|
)
|
||||||
|
|
||||||
@ -1021,7 +1022,9 @@ class PlayerFragment : Fragment(), OnlinePlayerOptions {
|
|||||||
if (PlayerHelper.relatedStreamsEnabled) {
|
if (PlayerHelper.relatedStreamsEnabled) {
|
||||||
binding.relatedRecView.adapter = VideosAdapter(
|
binding.relatedRecView.adapter = VideosAdapter(
|
||||||
streams.relatedStreams.filter { !it.title.isNullOrBlank() }.toMutableList(),
|
streams.relatedStreams.filter { !it.title.isNullOrBlank() }.toMutableList(),
|
||||||
forceMode = VideosAdapter.Companion.ForceMode.RELATED
|
forceMode = if (
|
||||||
|
resources.configuration.orientation == Configuration.ORIENTATION_PORTRAIT
|
||||||
|
) VideosAdapter.Companion.ForceMode.RELATED else VideosAdapter.Companion.ForceMode.TRENDING
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -185,7 +185,7 @@
|
|||||||
<RelativeLayout
|
<RelativeLayout
|
||||||
android:id="@+id/related_container"
|
android:id="@+id/related_container"
|
||||||
android:layout_width="0dp"
|
android:layout_width="0dp"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="match_parent"
|
||||||
android:animateLayoutChanges="true"
|
android:animateLayoutChanges="true"
|
||||||
android:descendantFocusability="blocksDescendants"
|
android:descendantFocusability="blocksDescendants"
|
||||||
app:layout_constraintTop_toTopOf="parent"
|
app:layout_constraintTop_toTopOf="parent"
|
||||||
|
Loading…
x
Reference in New Issue
Block a user