fix(dropbox) fix signing out when switching rec providers

This commit is contained in:
Saúl Ibarra Corretgé 2022-08-09 17:08:57 +02:00 committed by Дамян Минков
parent 7b361b3e23
commit f5649efa49
1 changed files with 13 additions and 5 deletions

View File

@ -189,6 +189,19 @@ class StartRecordingDialogContent extends Component<Props> {
} }
} }
/**
* Implements {@code Component#componentDidUpdate}.
*
* @inheritdoc
*/
componentDidUpdate(prevProps) {
// Auto sign-out when the use chooses another recording service.
if (prevProps.selectedRecordingService === RECORDING_TYPES.DROPBOX
&& this.props.selectedRecordingService !== RECORDING_TYPES.DROPBOX && this.props.isTokenValid) {
this._onSignOut();
}
}
/** /**
* Renders the component. * Renders the component.
* *
@ -508,7 +521,6 @@ class StartRecordingDialogContent extends Component<Props> {
*/ */
_onRecordingServiceSwitchChange() { _onRecordingServiceSwitchChange() {
const { const {
isTokenValid,
onChange, onChange,
selectedRecordingService selectedRecordingService
} = this.props; } = this.props;
@ -519,10 +531,6 @@ class StartRecordingDialogContent extends Component<Props> {
} }
onChange(RECORDING_TYPES.JITSI_REC_SERVICE); onChange(RECORDING_TYPES.JITSI_REC_SERVICE);
if (isTokenValid) {
this._onSignOut();
}
} }
/** /**