fix(carmode) Don`t show rec/live labels after rec/ls finished

This commit is contained in:
Horatiu Muresan 2022-09-23 13:38:51 +03:00
parent c06d456ae6
commit 1c2dd401d7
1 changed files with 23 additions and 1 deletions

View File

@ -84,12 +84,30 @@ export default class AbstractRecordingLabel
super(props);
this.state = {
staleLabel: false
staleLabel: true
};
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}.
*
@ -149,6 +167,10 @@ export default class AbstractRecordingLabel
if (newProps._status === JitsiRecordingConstants.status.OFF) {
if (oldProps._status !== JitsiRecordingConstants.status.OFF) {
setTimeout(() => {
if (!this._mounted) {
return;
}
// Only if it's still OFF.
if (this.props._status
=== JitsiRecordingConstants.status.OFF) {