fix(rn,filmstrip) simplify visibility calculation

This commit is contained in:
Saúl Ibarra Corretgé 2021-03-18 12:36:09 +01:00 committed by Saúl Ibarra Corretgé
parent 9d4e49a5af
commit effa878fa4
1 changed files with 3 additions and 9 deletions

View File

@ -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<Props> {
* @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)
};
}