fix(rn,filmstrip) simplify visibility calculation
This commit is contained in:
parent
9d4e49a5af
commit
effa878fa4
|
@ -22,11 +22,6 @@ type Props = {
|
||||||
*/
|
*/
|
||||||
_aspectRatio: Symbol,
|
_aspectRatio: Symbol,
|
||||||
|
|
||||||
/**
|
|
||||||
* The indicator which determines whether the filmstrip is enabled.
|
|
||||||
*/
|
|
||||||
_enabled: boolean,
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The participants in the conference.
|
* The participants in the conference.
|
||||||
*/
|
*/
|
||||||
|
@ -86,9 +81,9 @@ class Filmstrip extends Component<Props> {
|
||||||
* @returns {ReactElement}
|
* @returns {ReactElement}
|
||||||
*/
|
*/
|
||||||
render() {
|
render() {
|
||||||
const { _aspectRatio, _enabled, _participants, _visible } = this.props;
|
const { _aspectRatio, _participants, _visible } = this.props;
|
||||||
|
|
||||||
if (!_enabled) {
|
if (!_visible) {
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -178,9 +173,8 @@ function _mapStateToProps(state) {
|
||||||
|
|
||||||
return {
|
return {
|
||||||
_aspectRatio: state['features/base/responsive-ui'].aspectRatio,
|
_aspectRatio: state['features/base/responsive-ui'].aspectRatio,
|
||||||
_enabled: enabled,
|
|
||||||
_participants: participants.filter(p => !p.local),
|
_participants: participants.filter(p => !p.local),
|
||||||
_visible: isFilmstripVisible(state)
|
_visible: enabled && isFilmstripVisible(state)
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue