fix(menu) do not display overflow menu button if no items
This commit is contained in:
parent
db48dc3ed3
commit
8d3d94f568
|
@ -1030,10 +1030,12 @@ class Toolbox extends Component<Props, State> {
|
|||
key = 'fullscreen'
|
||||
onClick = { this._onToolbarToggleFullScreen }
|
||||
text = { _fullScreen ? t('toolbar.exitFullScreen') : t('toolbar.enterFullScreen') } />,
|
||||
<LiveStreamButton
|
||||
this._shouldShowButton('livestreaming')
|
||||
&& <LiveStreamButton
|
||||
key = 'livestreaming'
|
||||
showLabel = { true } />,
|
||||
<RecordButton
|
||||
this._shouldShowButton('recording')
|
||||
&& <RecordButton
|
||||
key = 'record'
|
||||
showLabel = { true } />,
|
||||
this._shouldShowButton('sharedvideo')
|
||||
|
@ -1047,18 +1049,19 @@ class Toolbox extends Component<Props, State> {
|
|||
&& <SharedDocumentButton
|
||||
key = 'etherpad'
|
||||
showLabel = { true } />,
|
||||
<VideoBlurButton
|
||||
this._shouldShowButton('videobackgroundblur')
|
||||
&& <VideoBlurButton
|
||||
key = 'videobackgroundblur'
|
||||
showLabel = { true }
|
||||
visible = { this._shouldShowButton('videobackgroundblur') && !_screensharing } />,
|
||||
<SettingsButton
|
||||
visible = { !_screensharing } />,
|
||||
this._shouldShowButton('settings')
|
||||
&& <SettingsButton
|
||||
key = 'settings'
|
||||
showLabel = { true }
|
||||
visible = { this._shouldShowButton('settings') } />,
|
||||
<MuteEveryoneButton
|
||||
showLabel = { true } />,
|
||||
this._shouldShowButton('mute-everyone')
|
||||
&& <MuteEveryoneButton
|
||||
key = 'mute-everyone'
|
||||
showLabel = { true }
|
||||
visible = { this._shouldShowButton('mute-everyone') } />,
|
||||
showLabel = { true } />,
|
||||
this._shouldShowButton('stats')
|
||||
&& <OverflowMenuItem
|
||||
accessibilityLabel = { t('toolbar.accessibilityLabel.speakerStats') }
|
||||
|
@ -1224,7 +1227,7 @@ class Toolbox extends Component<Props, State> {
|
|||
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 = [];
|
||||
|
|
Loading…
Reference in New Issue