Skip to content

Commit

Permalink
Merge pull request #3626 from Bnyro/master
Browse files Browse the repository at this point in the history
Automatically scroll to the currently playing video in the queue
  • Loading branch information
Bnyro authored Apr 25, 2023
2 parents 94d37c5 + 1c6f561 commit 8ef2e53
Showing 1 changed file with 4 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,10 @@ class PlayingQueueSheet : ExpandedBottomSheet() {
val adapter = PlayingQueueAdapter()
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 {
val streams = PlayingQueue.getStreams().toMutableList()
val currentIndex = PlayingQueue.currentIndex()
Expand Down

0 comments on commit 8ef2e53

Please sign in to comment.