fix order of operations when toggling shuffle

This commit is contained in:
Drew Weymouth
2026-02-20 17:46:37 -08:00
parent 294be9a0a3
commit 68268c323b
+1 -3
View File
@@ -354,7 +354,6 @@ func (p *playbackEngine) GetTrackIdxByIdFrom(items []mediaprovider.MediaItem, id
} }
func (p *playbackEngine) SetShuffle(shuffle bool) { func (p *playbackEngine) SetShuffle(shuffle bool) {
if p.shuffle == shuffle { if p.shuffle == shuffle {
return return
} }
@@ -388,11 +387,10 @@ func (p *playbackEngine) SetShuffle(shuffle bool) {
} else { } else {
return return
} }
} }
p.handleNextTrackUpdated()
p.nowPlayingIdx = newNowPlayingIdx p.nowPlayingIdx = newNowPlayingIdx
p.handleNextTrackUpdated()
p.invokeNoArgCallbacks(p.onQueueChange) p.invokeNoArgCallbacks(p.onQueueChange)
} }