diff options
author | Florrie <towerofnix@gmail.com> | 2019-02-25 12:10:32 -0400 |
---|---|---|
committer | Florrie <towerofnix@gmail.com> | 2019-02-25 12:10:32 -0400 |
commit | 94414a2456d5302305e8801200177e9313b76858 (patch) | |
tree | f1cac0b5bf921bfd83e4663d2b94056c304a9bf6 | |
parent | e9ccfa2fd4221ddff4950d5180ee5c8fb0bf8117 (diff) |
Don't remove current track when clearing queue
-rw-r--r-- | ui.js | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/ui.js b/ui.js index 90fb13a..eb4a0a9 100644 --- a/ui.js +++ b/ui.js @@ -503,7 +503,10 @@ class AppElement extends FocusElement { } clearQueue() { - this.queueGrouplike.items = [] + // Clear the queue so that there aren't any items left in it (except for + // the track that's currently playing). + this.queueGrouplike.items = this.queueGrouplike.items + .filter(item => item === this.playingTrack) this.queueListingElement.buildItems() this.queueListingElement.pathElement.showItem(null) } |