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 committed by Horatiu Muresan
parent c06d456ae6
commit 90bcbebedb
1 changed files with 23 additions and 1 deletions

View File

@ -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) {