Merge pull request #8399 from jitsi/tavram/overflowmenu
fix(menu) do not display overflow menu button if no items
This commit is contained in:
commit
845e23a947
|
@ -1030,12 +1030,14 @@ class Toolbox extends Component<Props, State> {
|
|||
key = 'fullscreen'
|
||||
onClick = { this._onToolbarToggleFullScreen }
|
||||
text = { _fullScreen ? t('toolbar.exitFullScreen') : t('toolbar.enterFullScreen') } />,
|
||||
<LiveStreamButton
|
||||
key = 'livestreaming'
|
||||
showLabel = { true } />,
|
||||
<RecordButton
|
||||
key = 'record'
|
||||
showLabel = { true } />,
|
||||
this._shouldShowButton('livestreaming')
|
||||
&& <LiveStreamButton
|
||||
key = 'livestreaming'
|
||||
showLabel = { true } />,
|
||||
this._shouldShowButton('recording')
|
||||
&& <RecordButton
|
||||
key = 'record'
|
||||
showLabel = { true } />,
|
||||
this._shouldShowButton('sharedvideo')
|
||||
&& <OverflowMenuItem
|
||||
accessibilityLabel = { t('toolbar.accessibilityLabel.sharedvideo') }
|
||||
|
@ -1047,18 +1049,19 @@ class Toolbox extends Component<Props, State> {
|
|||
&& <SharedDocumentButton
|
||||
key = 'etherpad'
|
||||
showLabel = { true } />,
|
||||
<VideoBlurButton
|
||||
key = 'videobackgroundblur'
|
||||
showLabel = { true }
|
||||
visible = { this._shouldShowButton('videobackgroundblur') && !_screensharing } />,
|
||||
<SettingsButton
|
||||
key = 'settings'
|
||||
showLabel = { true }
|
||||
visible = { this._shouldShowButton('settings') } />,
|
||||
<MuteEveryoneButton
|
||||
key = 'mute-everyone'
|
||||
showLabel = { true }
|
||||
visible = { this._shouldShowButton('mute-everyone') } />,
|
||||
this._shouldShowButton('videobackgroundblur')
|
||||
&& <VideoBlurButton
|
||||
key = 'videobackgroundblur'
|
||||
showLabel = { true }
|
||||
visible = { !_screensharing } />,
|
||||
this._shouldShowButton('settings')
|
||||
&& <SettingsButton
|
||||
key = 'settings'
|
||||
showLabel = { true } />,
|
||||
this._shouldShowButton('mute-everyone')
|
||||
&& <MuteEveryoneButton
|
||||
key = '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