playback: fix ongoing sesson logic
Previous might have risked the state being blown up due to cascading pause changes? Not sure honestly.
This commit is contained in:
parent
93dee00285
commit
6b6fc4d62a
1 changed files with 4 additions and 4 deletions
|
@ -435,14 +435,14 @@ class ExoPlaybackStateHolder(
|
||||||
override fun endSession() {
|
override fun endSession() {
|
||||||
// This session has ended, so we need to reset this flag for when the next
|
// This session has ended, so we need to reset this flag for when the next
|
||||||
// session starts.
|
// session starts.
|
||||||
|
playbackManager.playing(false)
|
||||||
save {
|
save {
|
||||||
// User could feasibly start playing again if they were fast enough, so
|
// User could feasibly start playing again if they were fast enough, so
|
||||||
// we need to avoid stopping the foreground state if that's the case.
|
// we need to avoid stopping the foreground state if that's the case.
|
||||||
if (playbackManager.progression.isPlaying) {
|
if (!playbackManager.progression.isPlaying) {
|
||||||
playbackManager.playing(false)
|
sessionOngoing = false
|
||||||
|
playbackManager.ack(this, StateAck.SessionEnded)
|
||||||
}
|
}
|
||||||
sessionOngoing = false
|
|
||||||
playbackManager.ack(this, StateAck.SessionEnded)
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue