Browse Source

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

j8
yanas 8 years ago
parent
commit
930e65da66
1 changed files with 18 additions and 5 deletions
  1. 18
    5
      react/features/conference/components/Conference.native.js

+ 18
- 5
react/features/conference/components/Conference.native.js View File

@@ -102,6 +102,8 @@ class Conference extends Component {
102 102
     render() {
103 103
         const toolbarVisible = this.state.toolbarVisible;
104 104
 
105
+        this._setToolbarTimeout(toolbarVisible);
106
+
105 107
         return (
106 108
             <Container
107 109
                 onClick = { this._onClick }
@@ -145,11 +147,7 @@ class Conference extends Component {
145 147
 
146 148
         this.setState({ toolbarVisible });
147 149
 
148
-        this._clearToolbarTimeout();
149
-        if (toolbarVisible) {
150
-            this._toolbarTimeout
151
-                = setTimeout(this._onClick, TOOLBAR_TIMEOUT_MS);
152
-        }
150
+        this._setToolbarTimeout(toolbarVisible);
153 151
     }
154 152
 
155 153
     /**
@@ -201,6 +199,21 @@ class Conference extends Component {
201 199
 
202 200
         return null;
203 201
     }
202
+
203
+    /**
204
+     * Triggers the default toolbar timeout.
205
+     *
206
+     * @param {boolean} toolbarVisible - indicates if the toolbar is currently
207
+     * visible
208
+     * @private
209
+     */
210
+    _setToolbarTimeout(toolbarVisible) {
211
+        this._clearToolbarTimeout();
212
+        if (toolbarVisible) {
213
+            this._toolbarTimeout
214
+                = setTimeout(this._onClick, TOOLBAR_TIMEOUT_MS);
215
+        }
216
+    }
204 217
 }
205 218
 
206 219
 /**

Loading…
Cancel
Save