Fix queue update issue
Fix a bug where the queue would not be updated when the queue looped around to the beginning.
This commit is contained in:
parent
732b89a0b1
commit
90de930377
3 changed files with 4 additions and 6 deletions
|
@ -98,7 +98,7 @@ dependencies {
|
|||
implementation "com.google.android.exoplayer:extension-mediasession:$exoplayer_version"
|
||||
|
||||
// Image loading
|
||||
implementation "io.coil-kt:coil:1.1.1"
|
||||
implementation "io.coil-kt:coil:1.2.0"
|
||||
|
||||
// Material
|
||||
implementation "com.google.android.material:material:1.3.0"
|
||||
|
|
|
@ -260,16 +260,14 @@ class PlaybackStateManager private constructor() {
|
|||
|
||||
forceUserQueueUpdate()
|
||||
} else {
|
||||
// Increment the index.
|
||||
// If it cant be incremented anymore, end playback or loop depending on the setting.
|
||||
// Increment the index, if it cannot be incremented any further, then
|
||||
// loop and pause/resume playback depending on the setting
|
||||
if (mIndex < mQueue.lastIndex) {
|
||||
mIndex = mIndex.inc()
|
||||
updatePlayback(mQueue[mIndex])
|
||||
} else {
|
||||
mIndex = 0
|
||||
updatePlayback(mQueue[mIndex], shouldPlay = mLoopMode == LoopMode.ALL)
|
||||
|
||||
return
|
||||
}
|
||||
|
||||
forceQueueUpdate()
|
||||
|
|
|
@ -65,7 +65,7 @@ class SlideLinearLayout @JvmOverloads constructor(
|
|||
var consumed = false
|
||||
|
||||
children.forEach { view ->
|
||||
consumed = consumed or super.drawChild(canvas, view, drawingTime)
|
||||
consumed = consumed || super.drawChild(canvas, view, drawingTime)
|
||||
}
|
||||
|
||||
return consumed
|
||||
|
|
Loading…
Reference in a new issue