mirror of
https://github.com/libre-tube/LibreTube.git
synced 2024-12-14 06:10:31 +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(
|
||||
context,
|
||||
LinearLayoutManager.HORIZONTAL,
|
||||
if (resources.configuration.orientation == Configuration.ORIENTATION_PORTRAIT)
|
||||
LinearLayoutManager.HORIZONTAL else LinearLayoutManager.VERTICAL,
|
||||
false
|
||||
)
|
||||
|
||||
@ -1021,7 +1022,9 @@ class PlayerFragment : Fragment(), OnlinePlayerOptions {
|
||||
if (PlayerHelper.relatedStreamsEnabled) {
|
||||
binding.relatedRecView.adapter = VideosAdapter(
|
||||
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
|
||||
android:id="@+id/related_container"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_height="match_parent"
|
||||
android:animateLayoutChanges="true"
|
||||
android:descendantFocusability="blocksDescendants"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
|
Loading…
Reference in New Issue
Block a user