« get me outta code hell

Minor code cleanup - 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-07-25 12:23:05 -0300
committerFlorrie <towerofnix@gmail.com>2018-07-25 12:23:05 -0300
commit02c1649d64406b2225189b702fb09c0b48fac856 (patch)
treed96652a5f24a2677db2cd0aa681fcd3b8ca51a58
parentd65ac1af611e9e9042bf1cbe3272540c66db5431 (diff)
Minor code cleanup
-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')