[RN] Toggle audio-only icon based on state
This commit is contained in:
parent
46a87e42ce
commit
f878f54b4d
|
@ -31,6 +31,11 @@ class Toolbox extends Component {
|
||||||
*/
|
*/
|
||||||
_audioMuted: React.PropTypes.bool,
|
_audioMuted: React.PropTypes.bool,
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Flag showing whether the audio-only mode is in use.
|
||||||
|
*/
|
||||||
|
_audioOnly: React.PropTypes.bool,
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Flag showing whether room is locked.
|
* Flag showing whether room is locked.
|
||||||
*/
|
*/
|
||||||
|
@ -207,7 +212,9 @@ class Toolbox extends Component {
|
||||||
style = { style }
|
style = { style }
|
||||||
underlayColor = { underlayColor } />
|
underlayColor = { underlayColor } />
|
||||||
<ToolbarButton
|
<ToolbarButton
|
||||||
iconName = 'visibility'
|
iconName = {
|
||||||
|
this.props._audioOnly ? 'visibility-off' : 'visibility'
|
||||||
|
}
|
||||||
iconStyle = { iconStyle }
|
iconStyle = { iconStyle }
|
||||||
onClick = { this.props._onToggleAudioOnly }
|
onClick = { this.props._onToggleAudioOnly }
|
||||||
style = { style }
|
style = { style }
|
||||||
|
@ -305,6 +312,7 @@ function _mapDispatchToProps(dispatch) {
|
||||||
*
|
*
|
||||||
* @param {Object} state - Redux store.
|
* @param {Object} state - Redux store.
|
||||||
* @returns {{
|
* @returns {{
|
||||||
|
* _audioOnly: boolean,
|
||||||
* _locked: boolean
|
* _locked: boolean
|
||||||
* }}
|
* }}
|
||||||
* @private
|
* @private
|
||||||
|
@ -315,6 +323,15 @@ function _mapStateToProps(state) {
|
||||||
return {
|
return {
|
||||||
...abstractMapStateToProps(state),
|
...abstractMapStateToProps(state),
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The indicator which determines whether the conference is in
|
||||||
|
* audio-only mode.
|
||||||
|
*
|
||||||
|
* @protected
|
||||||
|
* @type {boolean}
|
||||||
|
*/
|
||||||
|
_audioOnly: Boolean(conference.audioOnly),
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The indicator which determines whether the conference is
|
* The indicator which determines whether the conference is
|
||||||
* locked/password-protected.
|
* locked/password-protected.
|
||||||
|
|
Loading…
Reference in New Issue