« get me outta code hell

Fix toggling pause not updating screen - 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:
authorFlorrie <towerofnix@gmail.com>2019-09-17 18:22:07 -0300
committerFlorrie <towerofnix@gmail.com>2019-09-17 18:22:07 -0300
commit8360089b7116675b14f938e967b56ab460bdaa0d (patch)
treeed5b7351e64e2636fa1efeda0fcaee97a96062ca /ui.js
parentca52191a803879a64c262d7aa5c002d5d374b0a2 (diff)
Fix toggling pause not updating screen
This makes the pause indicator (next to the time remaining in the queue)
work again.
Diffstat (limited to 'ui.js')
-rw-r--r--ui.js3
1 files changed, 3 insertions, 0 deletions
diff --git a/ui.js b/ui.js
index f654ef8..e024eef 100644
--- a/ui.js
+++ b/ui.js
@@ -2572,6 +2572,7 @@ class PlaybackInfoElement extends DisplayElement {
     this.lenSecTotal = lenSecTotal
     this.volume = player.volume
     this.isLooping = player.isLooping
+    this.isPaused = player.isPaused
 
     this.progressBarLabel.text = '-'.repeat(Math.floor(this.w / lenSecTotal * curSecTotal))
     this.progressTextLabel.text = timeDone + ' / ' + duration
@@ -2615,6 +2616,8 @@ class PlaybackInfoElement extends DisplayElement {
   set volume(v) { return this.setDep('volume', v) }
   get isLooping() { return this.getDep('isLooping') }
   set isLooping(v) { return this.setDep('isLooping', v) }
+  get isPaused() { return this.getDep('isPaused') }
+  set isPaused(v) { return this.setDep('isPaused', v) }
 }
 
 class OpenPlaylistDialog extends Dialog {