From 9c146c124507ace2da882272183cd73c2baaa7d4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sa=C3=BAl=20Ibarra=20Corretg=C3=A9?= Date: Tue, 19 Nov 2019 08:59:10 +0100 Subject: [PATCH] subject: hide participant count for 1-1 calls refs: https://github.com/jitsi/jitsi-meet/issues/4871 --- react/features/conference/components/web/Subject.js | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/react/features/conference/components/web/Subject.js b/react/features/conference/components/web/Subject.js index 472641cbb..57bf05f5b 100644 --- a/react/features/conference/components/web/Subject.js +++ b/react/features/conference/components/web/Subject.js @@ -3,6 +3,7 @@ import React, { Component } from 'react'; import { getConferenceName } from '../../../base/conference/functions'; +import { getParticipantCount } from '../../../base/participants/functions'; import { connect } from '../../../base/redux'; import { isToolboxVisible } from '../../../toolbox'; @@ -13,6 +14,11 @@ import ParticipantsCount from './ParticipantsCount'; */ type Props = { + /** + * Whether then participant count should be shown or not. + */ + _showParticipantCount: boolean, + /** * The subject or the of the conference. * Falls back to conference name. @@ -39,12 +45,12 @@ class Subject extends Component { * @returns {ReactElement} */ render() { - const { _subject, _visible } = this.props; + const { _showParticipantCount, _subject, _visible } = this.props; return (
{ _subject } - + { _showParticipantCount && }
); } @@ -62,8 +68,10 @@ class Subject extends Component { * }} */ function _mapStateToProps(state) { + const participantCount = getParticipantCount(state); return { + _showParticipantCount: participantCount > 2, _subject: getConferenceName(state), _visible: isToolboxVisible(state) };