From 2954284abee1b2e5754c0569288108a659c5cee2 Mon Sep 17 00:00:00 2001 From: Florrie Date: Mon, 12 Nov 2018 13:44:48 -0400 Subject: 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. --- ui.js | 20 ++++++++++---------- 1 file 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]) -- cgit 1.3.0-6-gf8a5