瀏覽代碼

fix(rn,filmstrip) simplify visibility calculation

j8
Saúl Ibarra Corretgé 4 年之前
父節點
當前提交
effa878fa4
共有 1 個文件被更改,包括 3 次插入9 次删除
  1. 3
    9
      react/features/filmstrip/components/native/Filmstrip.js

+ 3
- 9
react/features/filmstrip/components/native/Filmstrip.js 查看文件

@@ -22,11 +22,6 @@ type Props = {
22 22
      */
23 23
     _aspectRatio: Symbol,
24 24
 
25
-    /**
26
-     * The indicator which determines whether the filmstrip is enabled.
27
-     */
28
-    _enabled: boolean,
29
-
30 25
     /**
31 26
      * The participants in the conference.
32 27
      */
@@ -86,9 +81,9 @@ class Filmstrip extends Component<Props> {
86 81
      * @returns {ReactElement}
87 82
      */
88 83
     render() {
89
-        const { _aspectRatio, _enabled, _participants, _visible } = this.props;
84
+        const { _aspectRatio, _participants, _visible } = this.props;
90 85
 
91
-        if (!_enabled) {
86
+        if (!_visible) {
92 87
             return null;
93 88
         }
94 89
 
@@ -178,9 +173,8 @@ function _mapStateToProps(state) {
178 173
 
179 174
     return {
180 175
         _aspectRatio: state['features/base/responsive-ui'].aspectRatio,
181
-        _enabled: enabled,
182 176
         _participants: participants.filter(p => !p.local),
183
-        _visible: isFilmstripVisible(state)
177
+        _visible: enabled && isFilmstripVisible(state)
184 178
     };
185 179
 }
186 180
 

Loading…
取消
儲存