Fix(React/conference): Sets an initial toolbar view timeout

pull/1225/head
yanas 9 years ago
parent c46772015b
commit 930e65da66
  1. 23
      react/features/conference/components/Conference.native.js

@ -102,6 +102,8 @@ class Conference extends Component {
render() {
const toolbarVisible = this.state.toolbarVisible;
this._setToolbarTimeout(toolbarVisible);
return (
<Container
onClick = { this._onClick }
@ -145,11 +147,7 @@ class Conference extends Component {
this.setState({ toolbarVisible });
this._clearToolbarTimeout();
if (toolbarVisible) {
this._toolbarTimeout
= setTimeout(this._onClick, TOOLBAR_TIMEOUT_MS);
}
this._setToolbarTimeout(toolbarVisible);
}
/**
@ -201,6 +199,21 @@ class Conference extends Component {
return null;
}
/**
* Triggers the default toolbar timeout.
*
* @param {boolean} toolbarVisible - indicates if the toolbar is currently
* visible
* @private
*/
_setToolbarTimeout(toolbarVisible) {
this._clearToolbarTimeout();
if (toolbarVisible) {
this._toolbarTimeout
= setTimeout(this._onClick, TOOLBAR_TIMEOUT_MS);
}
}
}
/**

Loading…
Cancel
Save