|
@@ -70,6 +70,16 @@ class Conference extends Component {
|
70
|
70
|
this._onClick = this._onClick.bind(this);
|
71
|
71
|
}
|
72
|
72
|
|
|
73
|
+ /**
|
|
74
|
+ * Inits the toolbar timeout after the component is initially rendered.
|
|
75
|
+ *
|
|
76
|
+ * @inheritdoc
|
|
77
|
+ * returns {void}
|
|
78
|
+ */
|
|
79
|
+ componentDidMount() {
|
|
80
|
+ this._setToolbarTimeout(this.state.toolbarVisible);
|
|
81
|
+ }
|
|
82
|
+
|
73
|
83
|
/**
|
74
|
84
|
* Inits new connection and conference when conference screen is entered.
|
75
|
85
|
*
|
|
@@ -145,11 +155,7 @@ class Conference extends Component {
|
145
|
155
|
|
146
|
156
|
this.setState({ toolbarVisible });
|
147
|
157
|
|
148
|
|
- this._clearToolbarTimeout();
|
149
|
|
- if (toolbarVisible) {
|
150
|
|
- this._toolbarTimeout
|
151
|
|
- = setTimeout(this._onClick, TOOLBAR_TIMEOUT_MS);
|
152
|
|
- }
|
|
158
|
+ this._setToolbarTimeout(toolbarVisible);
|
153
|
159
|
}
|
154
|
160
|
|
155
|
161
|
/**
|
|
@@ -201,6 +207,22 @@ class Conference extends Component {
|
201
|
207
|
|
202
|
208
|
return null;
|
203
|
209
|
}
|
|
210
|
+
|
|
211
|
+ /**
|
|
212
|
+ * Triggers the default toolbar timeout.
|
|
213
|
+ *
|
|
214
|
+ * @param {boolean} toolbarVisible - Indicates if the toolbar is currently
|
|
215
|
+ * visible.
|
|
216
|
+ * @private
|
|
217
|
+ * @returns {void}
|
|
218
|
+ */
|
|
219
|
+ _setToolbarTimeout(toolbarVisible) {
|
|
220
|
+ this._clearToolbarTimeout();
|
|
221
|
+ if (toolbarVisible) {
|
|
222
|
+ this._toolbarTimeout
|
|
223
|
+ = setTimeout(this._onClick, TOOLBAR_TIMEOUT_MS);
|
|
224
|
+ }
|
|
225
|
+ }
|
204
|
226
|
}
|
205
|
227
|
|
206
|
228
|
/**
|