Fix clearing queue with shortcut

This commit is contained in:
wvffle 2022-10-28 16:35:21 +00:00 committed by Georg Krause
parent d90f41ec51
commit 247abbcfea
No known key found for this signature in database
GPG Key ID: 2970D504B2183D22
1 changed files with 3 additions and 2 deletions

View File

@ -39,7 +39,8 @@ const {
currentIndex, currentIndex,
currentTrack, currentTrack,
isShuffled, isShuffled,
shuffle shuffle,
clear
} = useQueue() } = useQueue()
const store = useStore() const store = useStore()
@ -53,7 +54,7 @@ const toggleMobilePlayer = () => {
onKeyboardShortcut('e', toggleMobilePlayer) onKeyboardShortcut('e', toggleMobilePlayer)
onKeyboardShortcut('p', () => { isPlaying.value = !isPlaying.value }) onKeyboardShortcut('p', () => { isPlaying.value = !isPlaying.value })
onKeyboardShortcut('s', shuffle) onKeyboardShortcut('s', shuffle)
onKeyboardShortcut('q', () => store.dispatch('queue/clean')) onKeyboardShortcut('q', clear)
onKeyboardShortcut('m', mute) onKeyboardShortcut('m', mute)
onKeyboardShortcut('l', toggleLooping) onKeyboardShortcut('l', toggleLooping)
onKeyboardShortcut('f', () => store.dispatch('favorites/toggle', currentTrack.value?.id)) onKeyboardShortcut('f', () => store.dispatch('favorites/toggle', currentTrack.value?.id))