From f7d64341f86727e1fa27c331dd3df4b039ad90f3 Mon Sep 17 00:00:00 2001 From: Calinteodor Date: Fri, 20 Feb 2026 11:13:42 +0200 Subject: [PATCH] feat(lobby): Updates around toolbox menu and state (#16965) * Remove hang up button from prejoin/lobby toolbox and reset lobby visibility state when access denied. --- .../conference/components/native/Conference.tsx | 9 +++++---- .../lobby/components/AbstractLobbyScreen.tsx | 12 ++---------- .../features/lobby/components/native/LobbyScreen.tsx | 8 -------- react/features/lobby/middleware.ts | 1 + react/features/prejoin/components/native/Prejoin.tsx | 9 --------- 5 files changed, 8 insertions(+), 31 deletions(-) diff --git a/react/features/conference/components/native/Conference.tsx b/react/features/conference/components/native/Conference.tsx index a87ff1bc3a..0deaf02c51 100644 --- a/react/features/conference/components/native/Conference.tsx +++ b/react/features/conference/components/native/Conference.tsx @@ -227,7 +227,8 @@ class Conference extends AbstractConference { const { _audioOnlyEnabled, _showLobby, - _startCarMode + _startCarMode, + navigation } = this.props; if (!prevProps._showLobby && _showLobby) { @@ -236,10 +237,10 @@ class Conference extends AbstractConference { if (prevProps._showLobby && !_showLobby) { if (_audioOnlyEnabled && _startCarMode) { - return; + navigation.navigate(screen.conference.carmode); + } else { + navigate(screen.conference.main); } - - navigate(screen.conference.main); } } diff --git a/react/features/lobby/components/AbstractLobbyScreen.tsx b/react/features/lobby/components/AbstractLobbyScreen.tsx index 329ec3685d..a1b194e6f3 100644 --- a/react/features/lobby/components/AbstractLobbyScreen.tsx +++ b/react/features/lobby/components/AbstractLobbyScreen.tsx @@ -1,7 +1,7 @@ import React, { PureComponent } from 'react'; import { IReduxState, IStore } from '../../app/types'; -import { conferenceWillJoin } from '../../base/conference/actions'; +import { conferenceWillJoin } from '../../base/conference/actions.any'; import { getConferenceName } from '../../base/conference/functions'; import { IJitsiConference } from '../../base/conference/reducer'; import { getSecurityUiConfig } from '../../base/config/functions.any'; @@ -11,9 +11,8 @@ import { getLocalParticipant } from '../../base/participants/functions'; import { getFieldValue } from '../../base/react/functions'; import { updateSettings } from '../../base/settings/actions'; import { IMessage } from '../../chat/types'; -import { isDeviceStatusVisible } from '../../prejoin/functions'; +import { isDeviceStatusVisible } from '../../prejoin/functions.any'; import { cancelKnocking, joinWithPassword, onSendMessage, setPasswordJoinFailed, startKnocking } from '../actions'; -import { getLobbyConfig } from '../functions'; export const SCREEN_STATES = { EDIT: 1, @@ -28,11 +27,6 @@ export interface IProps { */ _deviceStatusVisible: boolean; - /** - * Whether to show the hangup button. - */ - _hangUp?: boolean; - /** * Indicates whether the message that display name is required is shown. */ @@ -456,7 +450,6 @@ export function _mapStateToProps(state: IReduxState) { const { disableLobbyPassword } = getSecurityUiConfig(state); const showCopyUrlButton = inviteEnabledFlag || !disableInviteFunctions; const deviceStatusVisible = isDeviceStatusVisible(state); - const { showHangUp = true } = getLobbyConfig(state); const { membersOnly, lobbyWaitingForHost } = state['features/base/conference']; const { isLobbyChatActive, lobbyMessageRecipient, messages } = state['features/chat']; const { showModeratorLogin } = state['features/authentication']; @@ -468,7 +461,6 @@ export function _mapStateToProps(state: IReduxState) { _lobbyChatMessages: messages, _lobbyMessageRecipient: lobbyMessageRecipient?.name, _login: showModeratorLogin && !state['features/base/jwt'].jwt, - _hangUp: showHangUp, _isLobbyChatActive: isLobbyChatActive, _meetingName: getConferenceName(state), _membersOnlyConference: membersOnly, diff --git a/react/features/lobby/components/native/LobbyScreen.tsx b/react/features/lobby/components/native/LobbyScreen.tsx index 3c09dda3e5..c47a9c2ff7 100644 --- a/react/features/lobby/components/native/LobbyScreen.tsx +++ b/react/features/lobby/components/native/LobbyScreen.tsx @@ -19,7 +19,6 @@ import { navigate } from '../../../mobile/navigation/components/lobby/LobbyNavigationContainerRef'; import { screen } from '../../../mobile/navigation/routes'; import { preJoinStyles } from '../../../prejoin/components/native/styles'; -import HangupButton from '../../../toolbox/components/HangupButton'; import AudioMuteButton from '../../../toolbox/components/native/AudioMuteButton'; import VideoMuteButton from '../../../toolbox/components/native/VideoMuteButton'; import AbstractLobbyScreen, { @@ -221,19 +220,12 @@ class LobbyScreen extends AbstractLobbyScreen { * @inheritdoc */ _renderToolbarButtons() { - const { _hangUp } = this.props; - return ( - { - _hangUp - && - } ); } diff --git a/react/features/lobby/middleware.ts b/react/features/lobby/middleware.ts index bfca256a98..eed1a896b1 100644 --- a/react/features/lobby/middleware.ts +++ b/react/features/lobby/middleware.ts @@ -336,6 +336,7 @@ function _conferenceFailed({ dispatch, getState }: IStore, next: Function, actio const result = next(action); if (error.name === JitsiConferenceErrors.CONFERENCE_ACCESS_DENIED) { + dispatch(hideLobbyScreen()); dispatch( showNotification({ appearance: NOTIFICATION_TYPE.ERROR, diff --git a/react/features/prejoin/components/native/Prejoin.tsx b/react/features/prejoin/components/native/Prejoin.tsx index b4f4bcb4d1..ee5ec62982 100644 --- a/react/features/prejoin/components/native/Prejoin.tsx +++ b/react/features/prejoin/components/native/Prejoin.tsx @@ -33,11 +33,9 @@ import { BUTTON_TYPES } from '../../../base/ui/constants.native'; import { openDisplayNamePrompt } from '../../../display-name/actions'; import BrandingImageBackground from '../../../dynamic-branding/components/native/BrandingImageBackground'; import LargeVideo from '../../../large-video/components/LargeVideo.native'; -import { getLobbyConfig } from '../../../lobby/functions'; import HeaderNavigationButton from '../../../mobile/navigation/components/HeaderNavigationButton'; import { navigateRoot } from '../../../mobile/navigation/rootNavigationContainerRef'; import { screen } from '../../../mobile/navigation/routes'; -import HangupButton from '../../../toolbox/components/HangupButton'; import AudioMuteButton from '../../../toolbox/components/native/AudioMuteButton'; import VideoMuteButton from '../../../toolbox/components/native/VideoMuteButton'; import { isDisplayNameRequired, isRoomNameEnabled } from '../../functions.native'; @@ -62,8 +60,6 @@ const Prejoin: React.FC = ({ navigation }: IPrejoinProps) => { const isDisplayNameReadonly = useSelector(isNameReadOnly); const roomName = useSelector((state: IReduxState) => getConferenceName(state)); const roomNameEnabled = useSelector((state: IReduxState) => isRoomNameEnabled(state)); - const { showHangUp: showHangUpLobby = true } = useSelector((state: IReduxState) => getLobbyConfig(state)); - const { knocking } = useSelector((state: IReduxState) => state['features/lobby']); const participantName = localParticipant?.name; const [ displayName, setDisplayName ] = useState(participantName || ''); @@ -185,11 +181,6 @@ const Prejoin: React.FC = ({ navigation }: IPrejoinProps) => { styles = { styles.buttonStylesBorderless } /> - { - knocking && showHangUpLobby - && - } { showDisplayNameInput &&