mirror of
https://github.com/libre-tube/LibreTube.git
synced 2025-04-29 16:30:31 +05:30
Automatically scroll to the currently playing video in the queue
This commit is contained in:
parent
94d37c5224
commit
1c6f561ff9
@ -33,6 +33,10 @@ class PlayingQueueSheet : ExpandedBottomSheet() {
|
|||||||
val adapter = PlayingQueueAdapter()
|
val adapter = PlayingQueueAdapter()
|
||||||
binding.optionsRecycler.adapter = adapter
|
binding.optionsRecycler.adapter = adapter
|
||||||
|
|
||||||
|
// scroll to the currently playing video in the queue
|
||||||
|
val currentPlayingIndex = PlayingQueue.currentIndex()
|
||||||
|
if (currentPlayingIndex != -1) binding.optionsRecycler.scrollToPosition(currentPlayingIndex)
|
||||||
|
|
||||||
binding.shuffle.setOnClickListener {
|
binding.shuffle.setOnClickListener {
|
||||||
val streams = PlayingQueue.getStreams().toMutableList()
|
val streams = PlayingQueue.getStreams().toMutableList()
|
||||||
val currentIndex = PlayingQueue.currentIndex()
|
val currentIndex = PlayingQueue.currentIndex()
|
||||||
|
Loading…
x
Reference in New Issue
Block a user