Skip to content

Jitsi Meet - Secure, Simple and Scalable Video Conferences that you use as a standalone app or embed in your web application.

rn,flags: add feature flag to enable / disable conference timer

NicolasD41ba55a6a93b
diff --git a/react/features/base/flags/constants.js b/react/features/base/flags/constants.js
index 7592cc9012..2d3e2dd588 100644
--- a/react/features/base/flags/constants.js
+++ b/react/features/base/flags/constants.js
@@ -25,6 +25,12 @@ export const CALL_INTEGRATION_ENABLED = 'call-integration.enabled';
*/
export const CLOSE_CAPTIONS_ENABLED = 'close-captions.enabled';
+/**
+ * Flag indicating if conference timer should be enabled.
+ * Default: enabled (true).
+ */
+export const CONFERENCE_TIMER_ENABLED = 'conference-timer.enabled';
+
/**
* Flag indicating if chat should be enabled.
* Default: enabled (true).
diff --git a/react/features/conference/components/native/NavigationBar.js b/react/features/conference/components/native/NavigationBar.js
index e35ff440b2..7088875ac0 100644
--- a/react/features/conference/components/native/NavigationBar.js
+++ b/react/features/conference/components/native/NavigationBar.js
@@ -5,7 +5,7 @@ import { SafeAreaView, Text, View } from 'react-native';
import LinearGradient from 'react-native-linear-gradient';
import { getConferenceName } from '../../../base/conference';
-import { getFeatureFlag, MEETING_NAME_ENABLED } from '../../../base/flags';
+import { getFeatureFlag, CONFERENCE_TIMER_ENABLED, MEETING_NAME_ENABLED } from '../../../base/flags';
import { connect } from '../../../base/redux';
import { PictureInPictureButton } from '../../../mobile/picture-in-picture';
import { isToolboxVisible } from '../../../toolbox';
@@ -15,6 +15,11 @@ import styles, { NAVBAR_GRADIENT_COLORS } from './styles';
type Props = {
+ /**
+ * Whether displaying the current conference timer is enabled or not.
+ */
+ _conferenceTimerEnabled: boolean,
+
/**
* Name of the meeting we're currently in.
*/
@@ -73,7 +78,9 @@ class NavigationBar extends Component<Props> {
{ this.props._meetingName }
</Text>
}
- <ConferenceTimer />
+ {
+ this.props._conferenceTimerEnabled && <ConferenceTimer />
+ }
</View>
</View>
];
@@ -89,6 +96,7 @@ class NavigationBar extends Component<Props> {
*/
function _mapStateToProps(state) {
return {
+ _conferenceTimerEnabled: getFeatureFlag(state, CONFERENCE_TIMER_ENABLED, true),
_meetingName: getConferenceName(state),
_meetingNameEnabled: getFeatureFlag(state, MEETING_NAME_ENABLED, true),
_visible: isToolboxVisible(state)