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:
@@ -107,6 +107,8 @@ class PlaybackPanelFragment :
|
|||||||
binding.playbackCoverPager.apply {
|
binding.playbackCoverPager.apply {
|
||||||
adapter = coverAdapter
|
adapter = coverAdapter
|
||||||
registerOnPageChangeCallback(OnCoverChangedCallback(queueModel))
|
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
|
// 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")
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user