rn,flags: add "toolbox.alwaysVisible" flag
This commit is contained in:
parent
b7f1f3c659
commit
3043f50ce3
|
@ -87,6 +87,12 @@ export const RECORDING_ENABLED = 'recording.enabled';
|
||||||
*/
|
*/
|
||||||
export const TILE_VIEW_ENABLED = 'tile-view.enabled';
|
export const TILE_VIEW_ENABLED = 'tile-view.enabled';
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Flag indicating if the toolbox should be always be visible
|
||||||
|
* Default: disabled (false).
|
||||||
|
*/
|
||||||
|
export const TOOLBOX_ALWAYS_VISIBLE = 'toolbox.alwaysVisible';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Flag indicating if the welcome page should be enabled.
|
* Flag indicating if the welcome page should be enabled.
|
||||||
* Default: disabled (false).
|
* Default: disabled (false).
|
||||||
|
|
|
@ -1,5 +1,6 @@
|
||||||
// @flow
|
// @flow
|
||||||
|
|
||||||
|
import { TOOLBOX_ALWAYS_VISIBLE, getFeatureFlag } from '../base/flags';
|
||||||
import { toState } from '../base/redux';
|
import { toState } from '../base/redux';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -13,6 +14,7 @@ export function isToolboxVisible(stateful: Object | Function) {
|
||||||
const state = toState(stateful);
|
const state = toState(stateful);
|
||||||
const { alwaysVisible, enabled, visible } = state['features/toolbox'];
|
const { alwaysVisible, enabled, visible } = state['features/toolbox'];
|
||||||
const { length: participantCount } = state['features/base/participants'];
|
const { length: participantCount } = state['features/base/participants'];
|
||||||
|
const flag = getFeatureFlag(state, TOOLBOX_ALWAYS_VISIBLE, false);
|
||||||
|
|
||||||
return enabled && (alwaysVisible || visible || participantCount === 1);
|
return enabled && (alwaysVisible || visible || participantCount === 1 || flag);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue