浏览代码

rn,flags: add "toolbox.alwaysVisible" flag

master
NicolasD 5 年前
父节点
当前提交
3043f50ce3
没有帐户链接到提交者的电子邮件
共有 2 个文件被更改,包括 9 次插入1 次删除
  1. 6
    0
      react/features/base/flags/constants.js
  2. 3
    1
      react/features/toolbox/functions.native.js

+ 6
- 0
react/features/base/flags/constants.js 查看文件

87
  */
87
  */
88
 export const TILE_VIEW_ENABLED = 'tile-view.enabled';
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
  * Flag indicating if the welcome page should be enabled.
97
  * Flag indicating if the welcome page should be enabled.
92
  * Default: disabled (false).
98
  * Default: disabled (false).

+ 3
- 1
react/features/toolbox/functions.native.js 查看文件

1
 // @flow
1
 // @flow
2
 
2
 
3
+import { TOOLBOX_ALWAYS_VISIBLE, getFeatureFlag } from '../base/flags';
3
 import { toState } from '../base/redux';
4
 import { toState } from '../base/redux';
4
 
5
 
5
 /**
6
 /**
13
     const state = toState(stateful);
14
     const state = toState(stateful);
14
     const { alwaysVisible, enabled, visible } = state['features/toolbox'];
15
     const { alwaysVisible, enabled, visible } = state['features/toolbox'];
15
     const { length: participantCount } = state['features/base/participants'];
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
 }

正在加载...
取消
保存