mirror of
https://gitcode.com/GitHub_Trending/ji/jitsi-meet.git
synced 2025-12-30 11:22:31 +00:00
Extract isToolboxVisible function
This commit is contained in:
committed by
Saúl Ibarra Corretgé
parent
d7d9bc4eeb
commit
045a2d6aca
@@ -7,8 +7,12 @@ import { connect } from 'react-redux';
|
||||
import { Container } from '../../../base/react';
|
||||
import { ChatButton } from '../../../chat';
|
||||
|
||||
import { isToolboxVisible } from '../../functions';
|
||||
|
||||
import AudioMuteButton from '../AudioMuteButton';
|
||||
import HangupButton from '../HangupButton';
|
||||
import VideoMuteButton from '../VideoMuteButton';
|
||||
|
||||
import OverflowMenuButton from './OverflowMenuButton';
|
||||
import styles, {
|
||||
chatButtonOverride,
|
||||
@@ -16,7 +20,6 @@ import styles, {
|
||||
toolbarButtonStyles,
|
||||
toolbarToggledButtonStyles
|
||||
} from './styles';
|
||||
import VideoMuteButton from '../VideoMuteButton';
|
||||
|
||||
/**
|
||||
* The number of buttons other than {@link HangupButton} to render in
|
||||
@@ -262,10 +265,8 @@ class Toolbox extends Component<Props, State> {
|
||||
* }}
|
||||
*/
|
||||
function _mapStateToProps(state: Object): Object {
|
||||
const { alwaysVisible, enabled, visible } = state['features/toolbox'];
|
||||
|
||||
return {
|
||||
_visible: enabled && (alwaysVisible || visible)
|
||||
_visible: isToolboxVisible(state)
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user