From f18a80cc039e1b0ab477782f0390f2f73805a509 Mon Sep 17 00:00:00 2001 From: jcass Date: Tue, 26 Jan 2016 16:56:17 +0200 Subject: [PATCH] Get rid of local variables in checking current slider value. --- mopidy_musicbox_webclient/static/js/controls.js | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/mopidy_musicbox_webclient/static/js/controls.js b/mopidy_musicbox_webclient/static/js/controls.js index 4db98f1..42dc5f9 100644 --- a/mopidy_musicbox_webclient/static/js/controls.js +++ b/mopidy_musicbox_webclient/static/js/controls.js @@ -408,7 +408,7 @@ function setPosition(pos) { */ function setVolume(value) { - if (value != currentVolume) { + if ($("#volumeslider").val() != value) { $("#volumeslider").val(value).slider('refresh'); } } @@ -421,12 +421,10 @@ function doVolume(value) { function triggerVolume() { mopidy.playback.setVolume(parseInt(volumeChanging)).then(); - currentVolume = volumeChanging volumeChanging = 0; } function doMute() { - //only emit the event, not the status mopidy.mixer.getMute().then(function(mute) { mopidy.mixer.setMute(!mute).then(); if (!mute) {