From 8d3d94f568de123bfe82f63a11c96828886c8e5c Mon Sep 17 00:00:00 2001 From: Tudor-Ovidiu Avram Date: Wed, 13 Jan 2021 11:55:38 +0200 Subject: [PATCH] fix(menu) do not display overflow menu button if no items --- .../toolbox/components/web/Toolbox.js | 41 ++++++++++--------- 1 file changed, 22 insertions(+), 19 deletions(-) diff --git a/react/features/toolbox/components/web/Toolbox.js b/react/features/toolbox/components/web/Toolbox.js index 3fd18c9cc..6eba71504 100644 --- a/react/features/toolbox/components/web/Toolbox.js +++ b/react/features/toolbox/components/web/Toolbox.js @@ -1030,12 +1030,14 @@ class Toolbox extends Component { key = 'fullscreen' onClick = { this._onToolbarToggleFullScreen } text = { _fullScreen ? t('toolbar.exitFullScreen') : t('toolbar.enterFullScreen') } />, - , - , + this._shouldShowButton('livestreaming') + && , + this._shouldShowButton('recording') + && , this._shouldShowButton('sharedvideo') && { && , - , - , - , + this._shouldShowButton('videobackgroundblur') + && , + this._shouldShowButton('settings') + && , + this._shouldShowButton('mute-everyone') + && , this._shouldShowButton('stats') && { t } = this.props; const overflowMenuContent = this._renderOverflowMenuContent(); - const overflowHasItems = Boolean(overflowMenuContent.length); + const overflowHasItems = overflowMenuContent.some(item => Boolean(item)); const toolbarAccLabel = 'toolbar.accessibilityLabel.moreActionsMenu'; const buttonsLeft = []; const buttonsRight = [];