mirror of
https://github.com/libre-tube/LibreTube.git
synced 2025-04-29 00:10:32 +05:30
fix: related videos are truncated after rotation
This commit is contained in:
parent
a5d41b7802
commit
73d12036f4
@ -1030,11 +1030,10 @@ class PlayerFragment : Fragment(), OnlinePlayerOptions {
|
||||
viewModel.chaptersLiveData.value = streams.chapters
|
||||
|
||||
if (PlayerHelper.relatedStreamsEnabled) {
|
||||
val relatedLayoutManager = binding.relatedRecView.layoutManager as LinearLayoutManager
|
||||
binding.relatedRecView.adapter = VideosAdapter(
|
||||
streams.relatedStreams.filter { !it.title.isNullOrBlank() }.toMutableList(),
|
||||
forceMode = if (
|
||||
resources.configuration.orientation == Configuration.ORIENTATION_PORTRAIT
|
||||
) {
|
||||
forceMode = if (relatedLayoutManager.orientation == LinearLayoutManager.HORIZONTAL) {
|
||||
VideosAdapter.Companion.ForceMode.RELATED
|
||||
} else {
|
||||
VideosAdapter.Companion.ForceMode.TRENDING
|
||||
|
Loading…
x
Reference in New Issue
Block a user