Get rid of local variables in checking current slider value.

This commit is contained in:
jcass 2016-01-26 16:56:17 +02:00
parent 14246cb7d1
commit f18a80cc03

View File

@ -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) {