From f5649efa494938379c76e0c5de50b275ee003be8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sa=C3=BAl=20Ibarra=20Corretg=C3=A9?= Date: Tue, 9 Aug 2022 17:08:57 +0200 Subject: [PATCH] fix(dropbox) fix signing out when switching rec providers --- .../Recording/StartRecordingDialogContent.js | 18 +++++++++++++----- 1 file changed, 13 insertions(+), 5 deletions(-) diff --git a/react/features/recording/components/Recording/StartRecordingDialogContent.js b/react/features/recording/components/Recording/StartRecordingDialogContent.js index b2146bf1a..fc9fe6520 100644 --- a/react/features/recording/components/Recording/StartRecordingDialogContent.js +++ b/react/features/recording/components/Recording/StartRecordingDialogContent.js @@ -189,6 +189,19 @@ class StartRecordingDialogContent extends Component { } } + /** + * 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. * @@ -508,7 +521,6 @@ class StartRecordingDialogContent extends Component { */ _onRecordingServiceSwitchChange() { const { - isTokenValid, onChange, selectedRecordingService } = this.props; @@ -519,10 +531,6 @@ class StartRecordingDialogContent extends Component { } onChange(RECORDING_TYPES.JITSI_REC_SERVICE); - - if (isTokenValid) { - this._onSignOut(); - } } /**