From effa878fa4e35ce3605834c709c09b67eb0ce64f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sa=C3=BAl=20Ibarra=20Corretg=C3=A9?= Date: Thu, 18 Mar 2021 12:36:09 +0100 Subject: [PATCH] fix(rn,filmstrip) simplify visibility calculation --- .../filmstrip/components/native/Filmstrip.js | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-) diff --git a/react/features/filmstrip/components/native/Filmstrip.js b/react/features/filmstrip/components/native/Filmstrip.js index a4589c312..14ce09af0 100644 --- a/react/features/filmstrip/components/native/Filmstrip.js +++ b/react/features/filmstrip/components/native/Filmstrip.js @@ -22,11 +22,6 @@ type Props = { */ _aspectRatio: Symbol, - /** - * The indicator which determines whether the filmstrip is enabled. - */ - _enabled: boolean, - /** * The participants in the conference. */ @@ -86,9 +81,9 @@ class Filmstrip extends Component { * @returns {ReactElement} */ render() { - const { _aspectRatio, _enabled, _participants, _visible } = this.props; + const { _aspectRatio, _participants, _visible } = this.props; - if (!_enabled) { + if (!_visible) { return null; } @@ -178,9 +173,8 @@ function _mapStateToProps(state) { return { _aspectRatio: state['features/base/responsive-ui'].aspectRatio, - _enabled: enabled, _participants: participants.filter(p => !p.local), - _visible: isFilmstripVisible(state) + _visible: enabled && isFilmstripVisible(state) }; }