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'
|
key = 'fullscreen'
|
||||||
onClick = { this._onToolbarToggleFullScreen }
|
onClick = { this._onToolbarToggleFullScreen }
|
||||||
text = { _fullScreen ? t('toolbar.exitFullScreen') : t('toolbar.enterFullScreen') } />,
|
text = { _fullScreen ? t('toolbar.exitFullScreen') : t('toolbar.enterFullScreen') } />,
|
||||||
<LiveStreamButton
|
this._shouldShowButton('livestreaming')
|
||||||
|
&& <LiveStreamButton
|
||||||
key = 'livestreaming'
|
key = 'livestreaming'
|
||||||
showLabel = { true } />,
|
showLabel = { true } />,
|
||||||
<RecordButton
|
this._shouldShowButton('recording')
|
||||||
|
&& <RecordButton
|
||||||
key = 'record'
|
key = 'record'
|
||||||
showLabel = { true } />,
|
showLabel = { true } />,
|
||||||
this._shouldShowButton('sharedvideo')
|
this._shouldShowButton('sharedvideo')
|
||||||
|
@ -1047,18 +1049,19 @@ class Toolbox extends Component<Props, State> {
|
||||||
&& <SharedDocumentButton
|
&& <SharedDocumentButton
|
||||||
key = 'etherpad'
|
key = 'etherpad'
|
||||||
showLabel = { true } />,
|
showLabel = { true } />,
|
||||||
<VideoBlurButton
|
this._shouldShowButton('videobackgroundblur')
|
||||||
|
&& <VideoBlurButton
|
||||||
key = 'videobackgroundblur'
|
key = 'videobackgroundblur'
|
||||||
showLabel = { true }
|
showLabel = { true }
|
||||||
visible = { this._shouldShowButton('videobackgroundblur') && !_screensharing } />,
|
visible = { !_screensharing } />,
|
||||||
<SettingsButton
|
this._shouldShowButton('settings')
|
||||||
|
&& <SettingsButton
|
||||||
key = 'settings'
|
key = 'settings'
|
||||||
showLabel = { true }
|
showLabel = { true } />,
|
||||||
visible = { this._shouldShowButton('settings') } />,
|
this._shouldShowButton('mute-everyone')
|
||||||
<MuteEveryoneButton
|
&& <MuteEveryoneButton
|
||||||
key = 'mute-everyone'
|
key = 'mute-everyone'
|
||||||
showLabel = { true }
|
showLabel = { true } />,
|
||||||
visible = { this._shouldShowButton('mute-everyone') } />,
|
|
||||||
this._shouldShowButton('stats')
|
this._shouldShowButton('stats')
|
||||||
&& <OverflowMenuItem
|
&& <OverflowMenuItem
|
||||||
accessibilityLabel = { t('toolbar.accessibilityLabel.speakerStats') }
|
accessibilityLabel = { t('toolbar.accessibilityLabel.speakerStats') }
|
||||||
|
@ -1224,7 +1227,7 @@ class Toolbox extends Component<Props, State> {
|
||||||
t
|
t
|
||||||
} = this.props;
|
} = this.props;
|
||||||
const overflowMenuContent = this._renderOverflowMenuContent();
|
const overflowMenuContent = this._renderOverflowMenuContent();
|
||||||
const overflowHasItems = Boolean(overflowMenuContent.length);
|
const overflowHasItems = overflowMenuContent.some(item => Boolean(item));
|
||||||
const toolbarAccLabel = 'toolbar.accessibilityLabel.moreActionsMenu';
|
const toolbarAccLabel = 'toolbar.accessibilityLabel.moreActionsMenu';
|
||||||
const buttonsLeft = [];
|
const buttonsLeft = [];
|
||||||
const buttonsRight = [];
|
const buttonsRight = [];
|
||||||
|
|
Loading…
Reference in New Issue