fix(remotecontrol): Execute Reciever.enable only when the value is changed

pull/1192/head
hristoterezov 8 years ago
parent 4af706bd83
commit 05bfbf5620
  1. 5
      modules/remotecontrol/Receiver.js

@ -32,9 +32,10 @@ export default class Receiver extends RemoteControlParticipant {
* @param {boolean} enabled the new state.
*/
enable(enabled) {
if(this.enabled !== enabled) {
this.enabled = enabled;
if(this.enabled === enabled) {
return;
}
this.enabled = enabled;
if(enabled === true) {
logger.log("Remote control receiver enabled.");
// Announce remote control support.

Loading…
Cancel
Save