« get me outta code hell

Fix many menu items being missing - mtui - Music Text User Interface - user-friendly command line music player
about summary refs log tree commit diff
diff options
context:
space:
mode:
authorFlorrie <towerofnix@gmail.com>2018-11-12 13:44:48 -0400
committerFlorrie <towerofnix@gmail.com>2018-11-12 13:44:48 -0400
commit2954284abee1b2e5754c0569288108a659c5cee2 (patch)
tree224c0e0136181098ad61114e0e3d52d495da23fb
parent70e06cc2f968dff9453813055822f01381133957 (diff)
Fix many menu items being missing
Oops! I got rid of (well, tweaked) the concepts of "real" and "fake"
rows, but forgot to get rid of the now-unnecessary (and disfunctional)
isReal checks.
-rw-r--r--ui.js20
1 files changed, 10 insertions, 10 deletions
diff --git a/ui.js b/ui.js
index 6748a87..d185811 100644
--- a/ui.js
+++ b/ui.js
@@ -1061,23 +1061,23 @@ class InteractiveGrouplikeItemElement extends BasicGrouplikeItemElement {
         x: this.absLeft,
         y: this.absTop + 1,
         items: [
-          editMode && this.isReal && {label: this.isMarked ? 'Unmark' : 'Mark', action: () => this.emit('mark')},
-          anyMarked && this.isReal && {label: 'Paste (above)', action: () => this.emit('paste', {where: 'above'})},
-          anyMarked && this.isReal && {label: 'Paste (below)', action: () => this.emit('paste', {where: 'below'})},
-          anyMarked && !this.isReal && {label: 'Paste', action: () => this.emit('paste')}, // No "above" or "elow" in the label because the "fake" item/row will be replaced (it'll disappear, since there'll be an item in the group)
-          this.isReal && {label: 'Play', action: () => this.emit('queue', {where: 'next', play: true})},
-          this.isReal && {label: 'Play next', action: () => this.emit('queue', {where: 'next'})},
-          this.isReal && {label: 'Play at end', action: () => this.emit('queue', {where: 'end'})},
+          editMode && {label: this.isMarked ? 'Unmark' : 'Mark', action: () => this.emit('mark')},
+          anyMarked && {label: 'Paste (above)', action: () => this.emit('paste', {where: 'above'})},
+          anyMarked && {label: 'Paste (below)', action: () => this.emit('paste', {where: 'below'})},
+          // anyMarked && !this.isReal && {label: 'Paste', action: () => this.emit('paste')}, // No "above" or "elow" in the label because the "fake" item/row will be replaced (it'll disappear, since there'll be an item in the group)
+          {label: 'Play', action: () => this.emit('queue', {where: 'next', play: true})},
+          {label: 'Play next', action: () => this.emit('queue', {where: 'next'})},
+          {label: 'Play at end', action: () => this.emit('queue', {where: 'end'})},
           this.isGroup && {label: 'Play next, shuffled', action: () => this.emit('queue', {where: 'next', shuffle: true})},
           this.isGroup && {label: 'Play at end, shuffled', action: () => this.emit('queue', {where: 'end', shuffle: true})},
-          this.isReal && {label: 'Remove from queue', action: () => this.emit('unqueue')}
+          {label: 'Remove from queue', action: () => this.emit('unqueue')}
         ]
       })
     }
   }
 
   writeStatus(writable) {
-    if (isGroup(this.item)) {
+    if (this.isGroup) {
       // The ANSI attributes here will apply to the rest of the line, too.
       // (We don't reset the active attributes until after drawing the rest of
       // the line.)
@@ -1097,7 +1097,7 @@ class InteractiveGrouplikeItemElement extends BasicGrouplikeItemElement {
       writable.write(' ')
     }
 
-    if (isGroup(this.item)) {
+    if (this.isGroup) {
       writable.write('G')
     } else if (record.downloading) {
       writable.write(braille[Math.floor(Date.now() / 250) % 6])