fix(toolbox): Show dominant speaker name only when in conference

This commit is contained in:
Vlad Piersec 2021-09-02 14:42:39 +03:00 committed by Saúl Ibarra Corretgé
parent add8265ab9
commit 56c0edc896
2 changed files with 11 additions and 2 deletions

View File

@ -238,7 +238,7 @@ class Conference extends AbstractConference<Props, *> {
<Filmstrip /> <Filmstrip />
</div> </div>
{ _showPrejoin || _showLobby || <Toolbox /> } { _showPrejoin || _showLobby || <Toolbox showDominantSpeakerName = { true } /> }
<Chat /> <Chat />
{ this.renderNotificationsContainer() } { this.renderNotificationsContainer() }

View File

@ -230,6 +230,11 @@ type Props = {
*/ */
dispatch: Function, dispatch: Function,
/**
* If the dominant speaker name should be displayed or not.
*/
showDominantSpeakerName?: boolean,
/** /**
* Invoked to obtain translated strings. * Invoked to obtain translated strings.
*/ */
@ -239,6 +244,7 @@ type Props = {
* Explicitly passed array with the buttons which this Toolbox should display. * Explicitly passed array with the buttons which this Toolbox should display.
*/ */
toolbarButtons: Array<string>, toolbarButtons: Array<string>,
}; };
declare var APP: Object; declare var APP: Object;
@ -1222,6 +1228,7 @@ class Toolbox extends Component<Props, State> {
_isMobile, _isMobile,
_overflowMenuVisible, _overflowMenuVisible,
_toolbarButtons, _toolbarButtons,
showDominantSpeakerName,
t, t,
_reactionsEnabled _reactionsEnabled
} = this.props; } = this.props;
@ -1240,7 +1247,9 @@ class Toolbox extends Component<Props, State> {
onMouseOut: this._onMouseOut, onMouseOut: this._onMouseOut,
onMouseOver: this._onMouseOver onMouseOver: this._onMouseOver
}) }> }) }>
<DominantSpeakerName />
{ showDominantSpeakerName && <DominantSpeakerName /> }
<div className = 'toolbox-content-items'> <div className = 'toolbox-content-items'>
{mainMenuButtons.map(({ Content, key, ...rest }) => Content !== Separator && ( {mainMenuButtons.map(({ Content, key, ...rest }) => Content !== Separator && (
<Content <Content