fix(carmode) Don`t show rec/live labels after rec/ls finished
This commit is contained in:
parent
c06d456ae6
commit
90bcbebedb
|
@ -84,12 +84,30 @@ export default class AbstractRecordingLabel
|
||||||
super(props);
|
super(props);
|
||||||
|
|
||||||
this.state = {
|
this.state = {
|
||||||
staleLabel: false
|
staleLabel: true
|
||||||
};
|
};
|
||||||
|
|
||||||
this._updateStaleStatus({}, props);
|
this._updateStaleStatus({}, props);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Implements React {@code Component}'s componentDidMount.
|
||||||
|
*
|
||||||
|
* @inheritdoc
|
||||||
|
*/
|
||||||
|
componentDidMount() {
|
||||||
|
this._mounted = true;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Implements React {@code Component}'s componentWillUnmount.
|
||||||
|
*
|
||||||
|
* @inheritdoc
|
||||||
|
*/
|
||||||
|
componentWillUnmount() {
|
||||||
|
this._mounted = false;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Implements {@code Component#componentDidUpdate}.
|
* Implements {@code Component#componentDidUpdate}.
|
||||||
*
|
*
|
||||||
|
@ -149,6 +167,10 @@ export default class AbstractRecordingLabel
|
||||||
if (newProps._status === JitsiRecordingConstants.status.OFF) {
|
if (newProps._status === JitsiRecordingConstants.status.OFF) {
|
||||||
if (oldProps._status !== JitsiRecordingConstants.status.OFF) {
|
if (oldProps._status !== JitsiRecordingConstants.status.OFF) {
|
||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
|
if (!this._mounted) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
// Only if it's still OFF.
|
// Only if it's still OFF.
|
||||||
if (this.props._status
|
if (this.props._status
|
||||||
=== JitsiRecordingConstants.status.OFF) {
|
=== JitsiRecordingConstants.status.OFF) {
|
||||||
|
|
Loading…
Reference in New Issue