Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
funkwhale
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container registry
Model registry
Operate
Terraform modules
Monitor
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Georg Abenthung
funkwhale
Commits
cea1c147
Commit
cea1c147
authored
4 years ago
by
Agate
Browse files
Options
Downloads
Patches
Plain Diff
Fix #1190: improved shuffle behaviour
parent
191f28f7
No related branches found
No related tags found
No related merge requests found
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
changes/changelog.d/1190.enhancement
+1
-0
1 addition, 0 deletions
changes/changelog.d/1190.enhancement
front/src/store/queue.js
+4
-5
4 additions, 5 deletions
front/src/store/queue.js
with
5 additions
and
5 deletions
changes/changelog.d/1190.enhancement
0 → 100644
+
1
−
0
View file @
cea1c147
Improved shuffle behaviour (#1190)
\ No newline at end of file
This diff is collapsed.
Click to expand it.
front/src/store/queue.js
+
4
−
5
View file @
cea1c147
...
@@ -158,16 +158,15 @@ export default {
...
@@ -158,16 +158,15 @@ export default {
// so we replay automatically on next track append
// so we replay automatically on next track append
commit
(
'
ended
'
,
true
)
commit
(
'
ended
'
,
true
)
},
},
shuffle
({
dispatch
,
commit
,
state
},
callback
)
{
async
shuffle
({
dispatch
,
commit
,
state
},
callback
)
{
let
toKeep
=
state
.
tracks
.
slice
(
0
,
state
.
currentIndex
+
1
)
let
shuffled
=
_
.
shuffle
(
state
.
tracks
)
let
toShuffle
=
state
.
tracks
.
slice
(
state
.
currentIndex
+
1
)
let
shuffled
=
toKeep
.
concat
(
_
.
shuffle
(
toShuffle
))
commit
(
'
tracks
'
,
[])
commit
(
'
tracks
'
,
[])
let
params
=
{
tracks
:
shuffled
}
let
params
=
{
tracks
:
shuffled
}
if
(
callback
)
{
if
(
callback
)
{
params
.
callback
=
callback
params
.
callback
=
callback
}
}
dispatch
(
'
appendMany
'
,
params
)
await
dispatch
(
'
appendMany
'
,
params
)
await
dispatch
(
'
currentIndex
'
,
0
)
}
}
}
}
}
}
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment