From 02c1649d64406b2225189b702fb09c0b48fac856 Mon Sep 17 00:00:00 2001 From: Florrie Date: Wed, 25 Jul 2018 12:23:05 -0300 Subject: Minor code cleanup --- ui.js | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) 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') -- cgit 1.3.0-6-gf8a5