mirror of
https://github.com/captbaritone/webamp.git
synced 2026-07-21 09:09:01 +00:00
Handle one case where we can leave a track playing after it's been removed
This commit is contained in:
parent
ff910ba97e
commit
76b85df82e
1 changed files with 6 additions and 1 deletions
|
|
@ -7,6 +7,7 @@ import {
|
|||
|
||||
import { clamp, sort, findLastIndex } from "../utils";
|
||||
import {
|
||||
STOP,
|
||||
REMOVE_TRACKS,
|
||||
REMOVE_ALL_TRACKS,
|
||||
REVERSE_LIST,
|
||||
|
|
@ -50,7 +51,11 @@ export function removeSelectedTracks(): Dispatchable {
|
|||
}
|
||||
|
||||
export function removeAllTracks(): Dispatchable {
|
||||
return { type: REMOVE_ALL_TRACKS };
|
||||
return dispatch => {
|
||||
// It's a bit funky that we need to do both of these.
|
||||
dispatch({ type: STOP });
|
||||
dispatch({ type: REMOVE_ALL_TRACKS });
|
||||
};
|
||||
}
|
||||
|
||||
export function reverseList(): Dispatchable {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue