Browse Source

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

master
NicolasD 5 years ago
parent
commit
41ba55a6a9
No account linked to committer's email address

+ 6
- 0
react/features/base/flags/constants.js View File

@@ -25,6 +25,12 @@ export const CALL_INTEGRATION_ENABLED = 'call-integration.enabled';
25 25
  */
26 26
 export const CLOSE_CAPTIONS_ENABLED = 'close-captions.enabled';
27 27
 
28
+/**
29
+ * Flag indicating if conference timer should be enabled.
30
+ * Default: enabled (true).
31
+ */
32
+export const CONFERENCE_TIMER_ENABLED = 'conference-timer.enabled';
33
+
28 34
 /**
29 35
  * Flag indicating if chat should be enabled.
30 36
  * Default: enabled (true).

+ 10
- 2
react/features/conference/components/native/NavigationBar.js View File

@@ -5,7 +5,7 @@ import { SafeAreaView, Text, View } from 'react-native';
5 5
 import LinearGradient from 'react-native-linear-gradient';
6 6
 
7 7
 import { getConferenceName } from '../../../base/conference';
8
-import { getFeatureFlag, MEETING_NAME_ENABLED } from '../../../base/flags';
8
+import { getFeatureFlag, CONFERENCE_TIMER_ENABLED, MEETING_NAME_ENABLED } from '../../../base/flags';
9 9
 import { connect } from '../../../base/redux';
10 10
 import { PictureInPictureButton } from '../../../mobile/picture-in-picture';
11 11
 import { isToolboxVisible } from '../../../toolbox';
@@ -15,6 +15,11 @@ import styles, { NAVBAR_GRADIENT_COLORS } from './styles';
15 15
 
16 16
 type Props = {
17 17
 
18
+    /**
19
+     * Whether displaying the current conference timer is enabled or not.
20
+     */
21
+    _conferenceTimerEnabled: boolean,
22
+
18 23
     /**
19 24
      * Name of the meeting we're currently in.
20 25
      */
@@ -73,7 +78,9 @@ class NavigationBar extends Component<Props> {
73 78
                             { this.props._meetingName }
74 79
                         </Text>
75 80
                     }
76
-                    <ConferenceTimer />
81
+                    {
82
+                        this.props._conferenceTimerEnabled && <ConferenceTimer />
83
+                    }
77 84
                 </View>
78 85
             </View>
79 86
         ];
@@ -89,6 +96,7 @@ class NavigationBar extends Component<Props> {
89 96
  */
90 97
 function _mapStateToProps(state) {
91 98
     return {
99
+        _conferenceTimerEnabled: getFeatureFlag(state, CONFERENCE_TIMER_ENABLED, true),
92 100
         _meetingName: getConferenceName(state),
93 101
         _meetingNameEnabled: getFeatureFlag(state, MEETING_NAME_ENABLED, true),
94 102
         _visible: isToolboxVisible(state)

Loading…
Cancel
Save