Fix(mobile/conference): Move the initial call to the componentDidMount method

This commit is contained in:
yanas 2017-01-03 15:06:47 -06:00
parent 930e65da66
commit 616ab0f635
1 changed files with 12 additions and 3 deletions

View File

@ -70,6 +70,16 @@ class Conference extends Component {
this._onClick = this._onClick.bind(this);
}
/**
* Inits the toolbar timeout after the component is initially rendered.
*
* @inheritDoc
* returns {void}
*/
componentDidMount() {
this._setToolbarTimeout(this.state.toolbarVisible);
}
/**
* Inits new connection and conference when conference screen is entered.
*
@ -102,8 +112,6 @@ class Conference extends Component {
render() {
const toolbarVisible = this.state.toolbarVisible;
this._setToolbarTimeout(toolbarVisible);
return (
<Container
onClick = { this._onClick }
@ -203,9 +211,10 @@ class Conference extends Component {
/**
* Triggers the default toolbar timeout.
*
* @param {boolean} toolbarVisible - indicates if the toolbar is currently
* @param {boolean} toolbarVisible - Indicates if the toolbar is currently
* visible
* @private
* @returns {void}
*/
_setToolbarTimeout(toolbarVisible) {
this._clearToolbarTimeout();