Fixes recording state handling.

This commit is contained in:
yanas 2016-03-29 16:30:08 -05:00
parent 39c350cdba
commit 76820bed8d
1 changed files with 6 additions and 4 deletions

View File

@ -181,7 +181,7 @@ var Status = {
AVAILABLE: "available", AVAILABLE: "available",
UNAVAILABLE: "unavailable", UNAVAILABLE: "unavailable",
PENDING: "pending" PENDING: "pending"
} };
var Recording = { var Recording = {
/** /**
@ -297,8 +297,8 @@ var Recording = {
// We don't want to do any changes if this is // We don't want to do any changes if this is
// an availability change. // an availability change.
if (this.currentState === Status.AVAILABLE if (this.currentState !== Status.ON
|| this.currentState === Status.UNAVAILABLE) && this.currentState !== Status.PENDING)
return; return;
buttonSelector.removeClass(this.baseClass + " active"); buttonSelector.removeClass(this.baseClass + " active");
@ -333,7 +333,9 @@ var Recording = {
this.currentState = recordingState; this.currentState = recordingState;
if (!labelSelector.is(":visible")) // We don't show the label for available state.
if (recordingState !== Status.AVAILABLE
&& !labelSelector.is(":visible"))
labelSelector.css({display: "inline-block"}); labelSelector.css({display: "inline-block"});
}, },
// checks whether recording is enabled and whether we have params // checks whether recording is enabled and whether we have params