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

pull/12233/head jitsi-meet_7824
Horatiu Muresan 2 years ago committed by Horatiu Muresan
parent c06d456ae6
commit 90bcbebedb
  1. 24
      react/features/recording/components/AbstractRecordingLabel.js

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

Loading…
Cancel
Save