« get me outta code hell

mtui - Music Text User Interface - user-friendly command line music player
about summary refs log tree commit diff
diff options
context:
space:
mode:
-rw-r--r--todo.txt5
-rw-r--r--ui.js4
2 files changed, 6 insertions, 3 deletions
diff --git a/todo.txt b/todo.txt
index 76f0c2e..1993e64 100644
--- a/todo.txt
+++ b/todo.txt
@@ -88,7 +88,7 @@ TODO: Investigate performance issues with very very long ListScrollForms.
 TODO: At some point, putting mtui downloads in ~/.mtui - but preferrably with
       a more humanish structure - would be quite nice..!
 
-TODO: Press "M" to show a context menu.
+TODO: Press "M" to show a context menu. (Done!)
 
 TODO: Figure out a keybinding for Mark (in edit mode) - probably Ctrl-M.
       (I prefer Ctrl to be used for functions that will open a dialog of some
@@ -96,3 +96,6 @@ TODO: Figure out a keybinding for Mark (in edit mode) - probably Ctrl-M.
 
 TODO: Only show scrollbars if the form is actually scrollable. (This would make
       context menus look better.)
+
+TODO: "Play" (now), in the context menu, should act like a queue-up-next, not a
+      queue-at-end. (Done!)
diff --git a/ui.js b/ui.js
index b42c24e..26512e4 100644
--- a/ui.js
+++ b/ui.js
@@ -123,10 +123,10 @@ class AppElement extends FocusElement {
     grouplikeListing.on('select (enter)', item => handleSelectFromMain(item))
     grouplikeListing.on('select (space)', item => this.handleSpacePressed(
       () => handleSelectFromMain(item)))
-    grouplikeListing.on('play', item => this.queueGrouplikeItem(item, playNow))
+    grouplikeListing.on('play', item => this.playGrouplikeItem(item))
     grouplikeListing.on('queue (at end)', item => this.queueGrouplikeItem(item))
     grouplikeListing.on('queue (shuffled)', item => this.shuffleQueueGrouplikeItem(item))
-    grouplikeListing.on('queue (play next)', item => this.queueGrouplikeItem(item, true, this.playingTrack))
+    grouplikeListing.on('queue (play next)', item => this.queueGrouplikeItem(item, playIfNothingElse, this.playingTrack))
     grouplikeListing.on('menu', (item, opts) => this.menu.show(opts))
 
     const updateListingsFor = item => {