diff options
| author | Florrie <towerofnix@gmail.com> | 2018-07-25 12:23:05 -0300 |
|---|---|---|
| committer | Florrie <towerofnix@gmail.com> | 2018-07-25 12:23:05 -0300 |
| commit | 02c1649d64406b2225189b702fb09c0b48fac856 (patch) | |
| tree | d96652a5f24a2677db2cd0aa681fcd3b8ca51a58 | |
| parent | d65ac1af611e9e9042bf1cbe3272540c66db5431 (diff) | |
Minor code cleanup
| -rw-r--r-- | ui.js | 6 |
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') |