[RN] Add ability to enable /disable the toolbox

pull/2479/head
Saúl Ibarra Corretgé 7 years ago committed by Lyubo Marinov
parent 240fff74c7
commit 7153d94dad
  1. 18
      react/features/toolbox/components/Toolbox.native.js

@ -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…
Cancel
Save