Media players can support turn off without turn on (#148)

This commit is contained in:
Adam Mills
2016-10-28 08:50:46 -07:00
committed by Paulus Schoutsen
parent d2ff6a18e1
commit ab187a7a84
+3 -3
View File
@@ -151,7 +151,7 @@
<paper-icon-button
icon='mdi:power'
on-tap='handleTogglePower'
invisible$='[[!playerObj.supportsTurnOff]]'
invisible$='[[computeHidePowerButton(playerObj)]]'
class='self-center secondary'
></paper-icon-button>
@@ -246,8 +246,8 @@ Polymer({
return cls;
},
computeHidePowerOnButton: function (playerObj) {
return !playerObj.isOff || !playerObj.supportsTurnOn;
computeHidePowerButton: function (playerObj) {
return playerObj.isOff ? !playerObj.supportsTurnOn : !playerObj.supportsTurnOff;
},
computePlayerObj: function (stateObj) {