From 8360089b7116675b14f938e967b56ab460bdaa0d Mon Sep 17 00:00:00 2001 From: Florrie Date: Tue, 17 Sep 2019 18:22:07 -0300 Subject: Fix toggling pause not updating screen This makes the pause indicator (next to the time remaining in the queue) work again. --- todo.txt | 6 ++++++ ui.js | 3 +++ 2 files changed, 9 insertions(+) diff --git a/todo.txt b/todo.txt index 641f892..8ebb796 100644 --- a/todo.txt +++ b/todo.txt @@ -378,3 +378,9 @@ TODO: Create a basic Element class, which DisplayElement extends. We have a lot (Done!) TODO: toString functions for elements! Handy for debugging. + +TODO: Revealing a track shouldn't forcibly position it at the bottom of the + screen (in grouplike listings that span more than a screen). Don't scroll + if the item is already visible, and if it's above the current scroll + area, make it appear at the top of the listing view instead of the + bottom. 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 { -- cgit 1.3.0-6-gf8a5