Skip to content
Snippets Groups Projects
Commit d33ee8e1 authored by Eliot Berriot's avatar Eliot Berriot
Browse files

Merge branch 'sshuffle-restart' into 'develop'

Front: Shuffle now restart next track from beginning (#70)

Closes #70

See merge request !52
parents 3eca0f26 7f70898f
No related branches found
No related tags found
No related merge requests found
...@@ -5,6 +5,7 @@ Changelog ...@@ -5,6 +5,7 @@ Changelog
---------------- ----------------
- Front: Fixed broken ajax call on radio builder (#69) - Front: Fixed broken ajax call on radio builder (#69)
- Front: Shuffle now restart next track from beginning (#70)
- Front: volume slider should now have the same style everywhere (#72) - Front: volume slider should now have the same style everywhere (#72)
0.5 (2018-02-24) 0.5 (2018-02-24)
......
...@@ -142,6 +142,7 @@ export default { ...@@ -142,6 +142,7 @@ export default {
}, },
shuffle ({dispatch, commit, state}) { shuffle ({dispatch, commit, state}) {
let shuffled = _.shuffle(state.tracks) let shuffled = _.shuffle(state.tracks)
commit('player/currentTime', 0, {root: true})
commit('tracks', []) commit('tracks', [])
dispatch('appendMany', {tracks: shuffled}) dispatch('appendMany', {tracks: shuffled})
} }
......
...@@ -322,6 +322,7 @@ describe('store/queue', () => { ...@@ -322,6 +322,7 @@ describe('store/queue', () => {
action: store.actions.shuffle, action: store.actions.shuffle,
params: {state: {tracks: tracks}}, params: {state: {tracks: tracks}},
expectedMutations: [ expectedMutations: [
{ type: 'player/currentTime', payload: 0 , options: {root: true}},
{ type: 'tracks', payload: [] } { type: 'tracks', payload: [] }
], ],
expectedActions: [ expectedActions: [
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment