Merge branch 'fix-mobile-toolbar-initial-timeout'
This commit is contained in:
commit
fd6c91715f
|
@ -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.
|
||||
*
|
||||
|
@ -145,11 +155,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 +207,22 @@ class Conference extends Component {
|
|||
|
||||
return null;
|
||||
}
|
||||
|
||||
/**
|
||||
* Triggers the default toolbar timeout.
|
||||
*
|
||||
* @param {boolean} toolbarVisible - Indicates if the toolbar is currently
|
||||
* visible.
|
||||
* @private
|
||||
* @returns {void}
|
||||
*/
|
||||
_setToolbarTimeout(toolbarVisible) {
|
||||
this._clearToolbarTimeout();
|
||||
if (toolbarVisible) {
|
||||
this._toolbarTimeout
|
||||
= setTimeout(this._onClick, TOOLBAR_TIMEOUT_MS);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
Loading…
Reference in New Issue