mirror of
https://gitcode.com/GitHub_Trending/ji/jitsi-meet.git
synced 2026-05-21 11:47:48 +00:00
feat(invite/security): Brave issues fixes (#14180)
* feat(invite/security): fix share icon/lobby mode switch
This commit is contained in:
@@ -56,7 +56,7 @@ interface IProps {
|
||||
_isModerator: boolean;
|
||||
|
||||
/**
|
||||
* State of the lobby mode.
|
||||
* Whether lobby mode is enabled or not.
|
||||
*/
|
||||
_lobbyEnabled: boolean;
|
||||
|
||||
@@ -107,6 +107,11 @@ interface IProps {
|
||||
*/
|
||||
interface IState {
|
||||
|
||||
/**
|
||||
* State of lobby mode.
|
||||
*/
|
||||
lobbyEnabled: boolean;
|
||||
|
||||
/**
|
||||
* Password added by the participant for room lock.
|
||||
*/
|
||||
@@ -134,6 +139,7 @@ class SecurityDialog extends PureComponent<IProps, IState> {
|
||||
super(props);
|
||||
|
||||
this.state = {
|
||||
lobbyEnabled: props._lobbyEnabled,
|
||||
passwordInputValue: '',
|
||||
showElement: props._locked === LOCKED_LOCALLY || false
|
||||
};
|
||||
@@ -168,7 +174,6 @@ class SecurityDialog extends PureComponent<IProps, IState> {
|
||||
*/
|
||||
_renderLobbyMode() {
|
||||
const {
|
||||
_lobbyEnabled,
|
||||
_lobbyModeSwitchVisible,
|
||||
t
|
||||
} = this.props;
|
||||
@@ -188,7 +193,7 @@ class SecurityDialog extends PureComponent<IProps, IState> {
|
||||
{ t('lobby.toggleLabel') }
|
||||
</Text>
|
||||
<Switch
|
||||
checked = { _lobbyEnabled }
|
||||
checked = { this.state.lobbyEnabled }
|
||||
onChange = { this._onToggleLobbyMode } />
|
||||
</View>
|
||||
</View>
|
||||
@@ -386,13 +391,14 @@ class SecurityDialog extends PureComponent<IProps, IState> {
|
||||
* @returns {void}
|
||||
*/
|
||||
_onToggleLobbyMode() {
|
||||
const { _lobbyEnabled, dispatch } = this.props;
|
||||
const { dispatch } = this.props;
|
||||
const { lobbyEnabled } = this.state;
|
||||
|
||||
if (_lobbyEnabled) {
|
||||
dispatch(toggleLobbyMode(false));
|
||||
} else {
|
||||
dispatch(toggleLobbyMode(true));
|
||||
}
|
||||
this.setState({
|
||||
lobbyEnabled: !lobbyEnabled
|
||||
});
|
||||
|
||||
dispatch(toggleLobbyMode(!lobbyEnabled));
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user