diff options
Diffstat (limited to 'ui.js')
-rw-r--r-- | ui.js | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/ui.js b/ui.js index 32cbb72..88d3eb0 100644 --- a/ui.js +++ b/ui.js @@ -79,6 +79,8 @@ class AppElement extends FocusElement { () => this.playGrouplikeItem(item, false))) this.queueListingElement.on('shuffle', () => this.shuffleQueue()) this.queueListingElement.on('clear', () => this.clearQueue()) + this.queueListingElement.on('select main listing', + () => this.form.selectInput(this.grouplikeListingElement)) this.paneRight.addChild(this.queueListingElement.pathElement) this.form.addInput(this.queueListingElement.pathElement, false) @@ -661,6 +663,14 @@ class QueueListingElement extends GrouplikeListingElement { return super.keyPressed(keyBuf) } } + + updateSelectedElement() { + if (this.inputs.length) { + super.updateSelectedElement() + } else { + this.emit('select main listing') + } + } } class PlaybackInfoElement extends DisplayElement { |