fix(frontend): make add-to-queue insert the track to play next
It previously appended to the end of the queue; 'Añadir a la cola' is expected to mean the track plays right after the current one, so it now splices in right after the currently playing track's index.
This commit is contained in:
@@ -338,7 +338,9 @@ class PlayerState {
|
||||
this.playQueue([item], 0);
|
||||
return;
|
||||
}
|
||||
this.tracks = [...this.tracks, toTrack(item)];
|
||||
const tracks = [...this.tracks];
|
||||
tracks.splice(this.#index() + 1, 0, toTrack(item));
|
||||
this.tracks = tracks;
|
||||
}
|
||||
|
||||
playTrack(id: string | number) {
|
||||
|
||||
Reference in New Issue
Block a user