Fixed shuffle button not shuffling songs
This commit is contained in:
parent
97f93e09d6
commit
ead8520333
2 changed files with 3 additions and 2 deletions
|
@ -302,7 +302,7 @@ object MusicPlayerRemote : KoinComponent {
|
|||
|
||||
fun setShuffleMode(shuffleMode: Int): Boolean {
|
||||
if (musicService != null) {
|
||||
musicService!!.shuffleMode = shuffleMode
|
||||
musicService!!.setShuffleMode(shuffleMode)
|
||||
return true
|
||||
}
|
||||
return false
|
||||
|
|
|
@ -541,7 +541,7 @@ class MusicService : MediaBrowserServiceCompat(),
|
|||
return shuffleMode
|
||||
}
|
||||
|
||||
private fun setShuffleMode(shuffleMode: Int) {
|
||||
fun setShuffleMode(shuffleMode: Int) {
|
||||
PreferenceManager.getDefaultSharedPreferences(this)
|
||||
.edit()
|
||||
.putInt(SAVED_SHUFFLE_MODE, shuffleMode)
|
||||
|
@ -1224,6 +1224,7 @@ class MusicService : MediaBrowserServiceCompat(),
|
|||
}
|
||||
META_CHANGED -> {
|
||||
playingNotification?.updateMetadata(currentSong) { startForegroundOrNotify() }
|
||||
playingNotification?.updateFavorite(currentSong) { startForegroundOrNotify() }
|
||||
updateMediaSessionMetaData()
|
||||
updateMediaSessionPlaybackState()
|
||||
savePosition()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue