Merge pull request #3281 from nayeemdv/libissue1

Fix Shuffle Button Error
This commit is contained in:
Bnyro 2023-03-10 13:30:29 +01:00 committed by GitHub
commit e3a648d15e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -166,6 +166,7 @@ class PlaylistFragment : Fragment() {
binding.bookmark.setIconResource(R.drawable.ic_shuffle)
binding.bookmark.text = getString(R.string.shuffle)
binding.bookmark.setOnClickListener {
if (playlistFeed.isEmpty()) return@setOnClickListener
val queue = playlistFeed.shuffled()
PlayingQueue.resetToDefaults()
PlayingQueue.add(*queue.toTypedArray())