playback: fix vertical scrolling interception

Fix an issue where the cover ViewPager would intercept vertical swipes
to collapse the queue sheet. This required manually configuring nested
scrolling states in the the internal RecyclerView.
This commit is contained in:
Alexander Capehart 2023-07-11 10:52:52 -06:00
parent 7e5cd2acd7
commit 4fa43d59ec
No known key found for this signature in database
GPG key ID: 37DBE3621FE9AD47

View file

@ -107,6 +107,8 @@ class PlaybackPanelFragment :
binding.playbackCoverPager.apply {
adapter = coverAdapter
registerOnPageChangeCallback(OnCoverChangedCallback(queueModel))
val recycler = VP_RECYCLER_FIELD.get(this@apply) as RecyclerView
recycler.isNestedScrollingEnabled = false
}
// Set up marquee on song information, alongside click handlers that navigate to each
@ -307,4 +309,8 @@ class PlaybackPanelFragment :
}
}
}
private companion object {
val VP_RECYCLER_FIELD: Field by lazyReflectedField(ViewPager2::class, "mRecyclerView")
}
}