subject: hide participant count for 1-1 calls
refs: https://github.com/jitsi/jitsi-meet/issues/4871
This commit is contained in:
parent
792f506425
commit
9c146c1245
|
@ -3,6 +3,7 @@
|
||||||
import React, { Component } from 'react';
|
import React, { Component } from 'react';
|
||||||
|
|
||||||
import { getConferenceName } from '../../../base/conference/functions';
|
import { getConferenceName } from '../../../base/conference/functions';
|
||||||
|
import { getParticipantCount } from '../../../base/participants/functions';
|
||||||
import { connect } from '../../../base/redux';
|
import { connect } from '../../../base/redux';
|
||||||
import { isToolboxVisible } from '../../../toolbox';
|
import { isToolboxVisible } from '../../../toolbox';
|
||||||
|
|
||||||
|
@ -13,6 +14,11 @@ import ParticipantsCount from './ParticipantsCount';
|
||||||
*/
|
*/
|
||||||
type Props = {
|
type Props = {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Whether then participant count should be shown or not.
|
||||||
|
*/
|
||||||
|
_showParticipantCount: boolean,
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The subject or the of the conference.
|
* The subject or the of the conference.
|
||||||
* Falls back to conference name.
|
* Falls back to conference name.
|
||||||
|
@ -39,12 +45,12 @@ class Subject extends Component<Props> {
|
||||||
* @returns {ReactElement}
|
* @returns {ReactElement}
|
||||||
*/
|
*/
|
||||||
render() {
|
render() {
|
||||||
const { _subject, _visible } = this.props;
|
const { _showParticipantCount, _subject, _visible } = this.props;
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div className = { `subject ${_visible ? 'visible' : ''}` }>
|
<div className = { `subject ${_visible ? 'visible' : ''}` }>
|
||||||
<span className = 'subject-text'>{ _subject }</span>
|
<span className = 'subject-text'>{ _subject }</span>
|
||||||
<ParticipantsCount />
|
{ _showParticipantCount && <ParticipantsCount /> }
|
||||||
</div>
|
</div>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
@ -62,8 +68,10 @@ class Subject extends Component<Props> {
|
||||||
* }}
|
* }}
|
||||||
*/
|
*/
|
||||||
function _mapStateToProps(state) {
|
function _mapStateToProps(state) {
|
||||||
|
const participantCount = getParticipantCount(state);
|
||||||
|
|
||||||
return {
|
return {
|
||||||
|
_showParticipantCount: participantCount > 2,
|
||||||
_subject: getConferenceName(state),
|
_subject: getConferenceName(state),
|
||||||
_visible: isToolboxVisible(state)
|
_visible: isToolboxVisible(state)
|
||||||
};
|
};
|
||||||
|
|
Loading…
Reference in New Issue