From ffc6ae333fd85283fb2fef6bc5478c07cc370ca3 Mon Sep 17 00:00:00 2001 From: Calinteodor Date: Tue, 19 Mar 2024 20:04:39 +0200 Subject: [PATCH] feat(premeeting/conference/prejoin): fix hiding meeting subject helper (#14500) * feat(premeeting/conference/prejoin): fix hiding meeting subject helper --- .../conference/components/native/carmode/TitleBar.tsx | 8 ++------ react/features/prejoin/functions.ts | 4 +++- 2 files changed, 5 insertions(+), 7 deletions(-) diff --git a/react/features/conference/components/native/carmode/TitleBar.tsx b/react/features/conference/components/native/carmode/TitleBar.tsx index 71e65bfbb9..99ea1333f6 100644 --- a/react/features/conference/components/native/carmode/TitleBar.tsx +++ b/react/features/conference/components/native/carmode/TitleBar.tsx @@ -4,11 +4,10 @@ import { connect, useSelector } from 'react-redux'; import { IReduxState } from '../../../../app/types'; import { getConferenceName } from '../../../../base/conference/functions'; -import { MEETING_NAME_ENABLED } from '../../../../base/flags/constants'; -import { getFeatureFlag } from '../../../../base/flags/functions'; import { JitsiRecordingConstants } from '../../../../base/lib-jitsi-meet'; import { getLocalParticipant } from '../../../../base/participants/functions'; import ConnectionIndicator from '../../../../connection-indicator/components/native/ConnectionIndicator'; +import { isRoomNameEnabled } from '../../../../prejoin/functions'; import RecordingLabel from '../../../../recording/components/native/RecordingLabel'; import VideoQualityLabel from '../../../../video-quality/components/VideoQualityLabel.native'; @@ -78,12 +77,9 @@ const TitleBar = (props: IProps): JSX.Element => { * @returns {IProps} */ function _mapStateToProps(state: IReduxState) { - const { hideConferenceSubject } = state['features/base/config']; - return { _meetingName: getConferenceName(state), - _meetingNameEnabled: - getFeatureFlag(state, MEETING_NAME_ENABLED, true) && !hideConferenceSubject + _meetingNameEnabled: isRoomNameEnabled(state) }; } diff --git a/react/features/prejoin/functions.ts b/react/features/prejoin/functions.ts index 20f61e817c..01833fbbae 100644 --- a/react/features/prejoin/functions.ts +++ b/react/features/prejoin/functions.ts @@ -204,6 +204,8 @@ export function isUnsafeRoomWarningEnabled(state: IReduxState): boolean { * @returns {boolean} */ export function isRoomNameEnabled(state: IReduxState): boolean { + const { hideConferenceSubject = false } = state['features/base/config']; + return getFeatureFlag(state, MEETING_NAME_ENABLED, true) - || !state['features/base/config'].hideConferenceSubject; + || !hideConferenceSubject; }