[RN] Add ability to enable /disable the toolbox
This commit is contained in:
parent
240fff74c7
commit
7153d94dad
|
@ -65,6 +65,11 @@ class Toolbox extends Component {
|
|||
*/
|
||||
_audioOnly: PropTypes.bool,
|
||||
|
||||
/**
|
||||
* Flag showing whether the toolbox is enabled or not.
|
||||
*/
|
||||
_enabled: PropTypes.bool,
|
||||
|
||||
/**
|
||||
* Flag showing whether room is locked.
|
||||
*/
|
||||
|
@ -130,6 +135,10 @@ class Toolbox extends Component {
|
|||
* @returns {ReactElement}
|
||||
*/
|
||||
render() {
|
||||
if (!this.props._enabled) {
|
||||
return null;
|
||||
}
|
||||
|
||||
const toolboxStyle
|
||||
= isNarrowAspectRatio(this)
|
||||
? styles.toolboxNarrow
|
||||
|
@ -441,6 +450,7 @@ function _mapDispatchToProps(dispatch) {
|
|||
*/
|
||||
function _mapStateToProps(state) {
|
||||
const conference = state['features/base/conference'];
|
||||
const { enabled } = state['features/toolbox'];
|
||||
|
||||
return {
|
||||
...abstractMapStateToProps(state),
|
||||
|
@ -454,6 +464,14 @@ function _mapStateToProps(state) {
|
|||
*/
|
||||
_audioOnly: Boolean(conference.audioOnly),
|
||||
|
||||
/**
|
||||
* The indicator which determines whether the toolbox is enabled or not.
|
||||
*
|
||||
* @private
|
||||
* @type {boolean}
|
||||
*/
|
||||
_enabled: enabled,
|
||||
|
||||
/**
|
||||
* The indicator which determines whether the conference is
|
||||
* locked/password-protected.
|
||||
|
|
Loading…
Reference in New Issue