Jitsi Meet - Secure, Simple and Scalable Video Conferences that you use as a standalone app or embed in your web application.
TypeScript debiandeep-videojitsijitsi-meetscalable-video-conferencessfuvideovideo-communicationvideo-conferencingwebrtc
feat(conference/recordin): Fix always on labels (#14368)
Calinteodor07b01b137127
diff --git a/react/features/conference/components/native/AlwaysOnLabels.tsx b/react/features/conference/components/native/AlwaysOnLabels.tsxindex c74da79d75..cf9832b8fb 100644--- a/react/features/conference/components/native/AlwaysOnLabels.tsx+++ b/react/features/conference/components/native/AlwaysOnLabels.tsx@@ -1,11 +1,13 @@import React, { useCallback } from 'react';import { TouchableOpacity } from 'react-native';-import { useDispatch } from 'react-redux';+import { useDispatch, useSelector } from 'react-redux';+import { IReduxState } from '../../../app/types';import { JitsiRecordingConstants } from '../../../base/lib-jitsi-meet';import { openHighlightDialog } from '../../../recording/actions.native';import HighlightButton from '../../../recording/components/Recording/native/HighlightButton';import RecordingLabel from '../../../recording/components/native/RecordingLabel';+import { getActiveSession } from '../../../recording/functions';import VisitorsCountLabel from '../../../visitors/components/native/VisitorsCountLabel';import RaisedHandsCountLabel from './RaisedHandsCountLabel';@@ -28,7 +30,10 @@ interface IProps {const AlwaysOnLabels = ({ createOnPress }: IProps) => {const dispatch = useDispatch();- const openHighlightDialogCallback = useCallback(() => dispatch(openHighlightDialog()), [ dispatch ]);+ const isStreaming = useSelector((state: IReduxState) =>+ Boolean(getActiveSession(state, JitsiRecordingConstants.mode.STREAM)));+ const openHighlightDialogCallback = useCallback(() =>+ dispatch(openHighlightDialog()), [ dispatch ]);return (<><TouchableOpacity@@ -36,11 +41,14 @@ const AlwaysOnLabels = ({ createOnPress }: IProps) => {onPress = { createOnPress(LABEL_ID_RECORDING) } ><RecordingLabel mode = { JitsiRecordingConstants.mode.FILE } /></TouchableOpacity>- <TouchableOpacity- hitSlop = { LabelHitSlop }- onPress = { createOnPress(LABEL_ID_STREAMING) } >- <RecordingLabel mode = { JitsiRecordingConstants.mode.STREAM } />- </TouchableOpacity>+ {+ isStreaming+ && <TouchableOpacity+ hitSlop = { LabelHitSlop }+ onPress = { createOnPress(LABEL_ID_STREAMING) } >+ <RecordingLabel mode = { JitsiRecordingConstants.mode.STREAM } />+ </TouchableOpacity>+ }<TouchableOpacityhitSlop = { LabelHitSlop }onPress = { openHighlightDialogCallback }>diff --git a/react/features/recording/components/native/RecordingExpandedLabel.ts b/react/features/recording/components/native/RecordingExpandedLabel.tsindex 7d39505215..b8d2991bf3 100644--- a/react/features/recording/components/native/RecordingExpandedLabel.ts+++ b/react/features/recording/components/native/RecordingExpandedLabel.ts@@ -43,7 +43,7 @@ class RecordingExpandedLabel extends ExpandedLabel<IProps> {*/_getLabel() {const { _status, mode, t } = this.props;- let postfix = 'recording', prefix = 'expandedOn'; // Default values.+ let postfix = 'expandedOn', prefix = 'recording'; // Default values.switch (mode) {case JitsiRecordingConstants.mode.STREAM: