Skip to content

Commit

Permalink
fix shuffle all playing a subset of the song list
Browse files Browse the repository at this point in the history
  • Loading branch information
lucaxvi committed Nov 3, 2024
1 parent f68c9ca commit e37d2cc
Showing 1 changed file with 0 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,6 @@ import org.akanework.gramophone.R
import org.akanework.gramophone.logic.ui.ItemHeightHelper
import org.akanework.gramophone.logic.ui.MyRecyclerView
import org.akanework.gramophone.ui.getAdapterType
import kotlin.random.Random

open class BaseDecorAdapter<T : BaseAdapter<*>>(
protected val adapter: T,
Expand Down Expand Up @@ -178,7 +177,6 @@ open class BaseDecorAdapter<T : BaseAdapter<*>>(
controller?.shuffleModeEnabled = true
list.takeIf { it.isNotEmpty() }?.also {
controller?.setMediaItems(it)
controller?.seekToDefaultPosition(Random.nextInt(0, it.size))
controller?.prepare()
controller?.play()
} ?: controller?.setMediaItems(listOf())
Expand Down

0 comments on commit e37d2cc

Please sign in to comment.