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

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

parent 43e009de
No related branches found
No related tags found
No related merge requests found
......@@ -5,6 +5,8 @@ Changelog
----------------
- Front: Fixed broken ajax call on radio builder (#69)
- Front: Shuffle now restart next track from beginning (#70)
0.5 (2018-02-24)
----------------
......
......@@ -308,12 +308,6 @@ export default {
bottom: 5px;
left: 10%;
cursor: pointer;
display: none;
}
&:hover {
[type="range"] {
display: block;
}
}
}
......
......@@ -142,6 +142,7 @@ export default {
},
shuffle ({dispatch, commit, state}) {
let shuffled = _.shuffle(state.tracks)
commit('player/currentTime', 0, {root: true})
commit('tracks', [])
dispatch('appendMany', {tracks: shuffled})
}
......
......@@ -322,6 +322,7 @@ describe('store/queue', () => {
action: store.actions.shuffle,
params: {state: {tracks: tracks}},
expectedMutations: [
{ type: 'player/currentTime', payload: 0 , options: {root: true}},
{ type: 'tracks', payload: [] }
],
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