« 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--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])