瀏覽代碼

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

j8
yanas 8 年之前
父節點
當前提交
616ab0f635
共有 1 個檔案被更改,包括 12 行新增3 行删除
  1. 12
    3
      react/features/conference/components/Conference.native.js

+ 12
- 3
react/features/conference/components/Conference.native.js 查看文件

70
         this._onClick = this._onClick.bind(this);
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
      * Inits new connection and conference when conference screen is entered.
84
      * Inits new connection and conference when conference screen is entered.
75
      *
85
      *
102
     render() {
112
     render() {
103
         const toolbarVisible = this.state.toolbarVisible;
113
         const toolbarVisible = this.state.toolbarVisible;
104
 
114
 
105
-        this._setToolbarTimeout(toolbarVisible);
106
-
107
         return (
115
         return (
108
             <Container
116
             <Container
109
                 onClick = { this._onClick }
117
                 onClick = { this._onClick }
203
     /**
211
     /**
204
      * Triggers the default toolbar timeout.
212
      * Triggers the default toolbar timeout.
205
      *
213
      *
206
-     * @param {boolean} toolbarVisible - indicates if the toolbar is currently
214
+     * @param {boolean} toolbarVisible - Indicates if the toolbar is currently
207
      * visible
215
      * visible
208
      * @private
216
      * @private
217
+     * @returns {void}
209
      */
218
      */
210
     _setToolbarTimeout(toolbarVisible) {
219
     _setToolbarTimeout(toolbarVisible) {
211
         this._clearToolbarTimeout();
220
         this._clearToolbarTimeout();

Loading…
取消
儲存