Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: related videos are truncated after rotation #5178

Merged
merged 1 commit into from
Nov 17, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -1030,11 +1030,10 @@
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) {

Check failure on line 1036 in app/src/main/java/com/github/libretube/ui/fragments/PlayerFragment.kt

View workflow job for this annotation

GitHub Actions / Check Code Quality

[ktlint] reported by reviewdog 🐶 Exceeded max line length (100) Raw Output: app/src/main/java/com/github/libretube/ui/fragments/PlayerFragment.kt:1036:1: error: Exceeded max line length (100) (standard:max-line-length)
VideosAdapter.Companion.ForceMode.RELATED
} else {
VideosAdapter.Companion.ForceMode.TRENDING
Expand Down
Loading