Selaa lähdekoodia

subject: hide participant count for 1-1 calls

refs: https://github.com/jitsi/jitsi-meet/issues/4871
master
Saúl Ibarra Corretgé 6 vuotta sitten
vanhempi
commit
9c146c1245
1 muutettua tiedostoa jossa 10 lisäystä ja 2 poistoa
  1. 10
    2
      react/features/conference/components/web/Subject.js

+ 10
- 2
react/features/conference/components/web/Subject.js Näytä tiedosto

3
 import React, { Component } from 'react';
3
 import React, { Component } from 'react';
4
 
4
 
5
 import { getConferenceName } from '../../../base/conference/functions';
5
 import { getConferenceName } from '../../../base/conference/functions';
6
+import { getParticipantCount } from '../../../base/participants/functions';
6
 import { connect } from '../../../base/redux';
7
 import { connect } from '../../../base/redux';
7
 import { isToolboxVisible } from '../../../toolbox';
8
 import { isToolboxVisible } from '../../../toolbox';
8
 
9
 
13
  */
14
  */
14
 type Props = {
15
 type Props = {
15
 
16
 
17
+    /**
18
+     * Whether then participant count should be shown or not.
19
+     */
20
+    _showParticipantCount: boolean,
21
+
16
     /**
22
     /**
17
      * The subject or the of the conference.
23
      * The subject or the of the conference.
18
      * Falls back to conference name.
24
      * Falls back to conference name.
39
      * @returns {ReactElement}
45
      * @returns {ReactElement}
40
      */
46
      */
41
     render() {
47
     render() {
42
-        const { _subject, _visible } = this.props;
48
+        const { _showParticipantCount, _subject, _visible } = this.props;
43
 
49
 
44
         return (
50
         return (
45
             <div className = { `subject ${_visible ? 'visible' : ''}` }>
51
             <div className = { `subject ${_visible ? 'visible' : ''}` }>
46
                 <span className = 'subject-text'>{ _subject }</span>
52
                 <span className = 'subject-text'>{ _subject }</span>
47
-                <ParticipantsCount />
53
+                { _showParticipantCount && <ParticipantsCount /> }
48
             </div>
54
             </div>
49
         );
55
         );
50
     }
56
     }
62
  * }}
68
  * }}
63
  */
69
  */
64
 function _mapStateToProps(state) {
70
 function _mapStateToProps(state) {
71
+    const participantCount = getParticipantCount(state);
65
 
72
 
66
     return {
73
     return {
74
+        _showParticipantCount: participantCount > 2,
67
         _subject: getConferenceName(state),
75
         _subject: getConferenceName(state),
68
         _visible: isToolboxVisible(state)
76
         _visible: isToolboxVisible(state)
69
     };
77
     };

Loading…
Peruuta
Tallenna