« get me outta code hell

mtui - Music Text User Interface - user-friendly command line music player
about summary refs log tree commit diff
path: root/ui.js
diff options
context:
space:
mode:
Diffstat (limited to 'ui.js')
-rw-r--r--ui.js6
1 files changed, 5 insertions, 1 deletions
diff --git a/ui.js b/ui.js
index 3df7272..20f0167 100644
--- a/ui.js
+++ b/ui.js
@@ -900,7 +900,7 @@ class GrouplikeItemElement extends Button {
 
     const record = this.recordStore.getRecord(this.item)
 
-    if (this.recordStore.app.editMode && this.recordStore.app.markGrouplike.items.includes(this.item)) {
+    if (this.isMarked) {
       writable.write('M')
     } else {
       writable.write(' ')
@@ -919,6 +919,10 @@ class GrouplikeItemElement extends Button {
     writable.write(' ')
   }
 
+  get isMarked() {
+    return this.recordStore.app.editMode && this.recordStore.app.markGrouplike.items.includes(this.item)
+  }
+
   keyPressed(keyBuf) {
     if (telc.isCaselessLetter(keyBuf, 'd')) {
       this.emit('download')