Skip to content

Commit

Permalink
fix(dropbox) fix signing out when switching rec providers
Browse files Browse the repository at this point in the history
  • Loading branch information
saghul authored and damencho committed Aug 9, 2022
1 parent 7b361b3 commit f5649ef
Showing 1 changed file with 13 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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.
*
Expand Down Expand Up @@ -508,7 +521,6 @@ class StartRecordingDialogContent extends Component<Props> {
*/
_onRecordingServiceSwitchChange() {
const {
isTokenValid,
onChange,
selectedRecordingService
} = this.props;
Expand All @@ -519,10 +531,6 @@ class StartRecordingDialogContent extends Component<Props> {
}

onChange(RECORDING_TYPES.JITSI_REC_SERVICE);

if (isTokenValid) {
this._onSignOut();
}
}

/**
Expand Down

0 comments on commit f5649ef

Please sign in to comment.