Explorar el Código

rn,flags: add "toolbox.alwaysVisible" flag

master
NicolasD hace 5 años
padre
commit
3043f50ce3
No account linked to committer's email address

+ 6
- 0
react/features/base/flags/constants.js Ver fichero

@@ -87,6 +87,12 @@ export const RECORDING_ENABLED = 'recording.enabled';
87 87
  */
88 88
 export const TILE_VIEW_ENABLED = 'tile-view.enabled';
89 89
 
90
+/**
91
+ * Flag indicating if the toolbox should be always be visible
92
+ * Default: disabled (false).
93
+ */
94
+export const TOOLBOX_ALWAYS_VISIBLE = 'toolbox.alwaysVisible';
95
+
90 96
 /**
91 97
  * Flag indicating if the welcome page should be enabled.
92 98
  * Default: disabled (false).

+ 3
- 1
react/features/toolbox/functions.native.js Ver fichero

@@ -1,5 +1,6 @@
1 1
 // @flow
2 2
 
3
+import { TOOLBOX_ALWAYS_VISIBLE, getFeatureFlag } from '../base/flags';
3 4
 import { toState } from '../base/redux';
4 5
 
5 6
 /**
@@ -13,6 +14,7 @@ export function isToolboxVisible(stateful: Object | Function) {
13 14
     const state = toState(stateful);
14 15
     const { alwaysVisible, enabled, visible } = state['features/toolbox'];
15 16
     const { length: participantCount } = state['features/base/participants'];
17
+    const flag = getFeatureFlag(state, TOOLBOX_ALWAYS_VISIBLE, false);
16 18
 
17
-    return enabled && (alwaysVisible || visible || participantCount === 1);
19
+    return enabled && (alwaysVisible || visible || participantCount === 1 || flag);
18 20
 }

Loading…
Cancelar
Guardar