feat(toolbar) add flag for autohiding while chat open (#11104)
This commit is contained in:
parent
14ee7e247b
commit
faac45b5bc
|
@ -635,7 +635,9 @@ var config = {
|
|||
// timeout: 4000,
|
||||
// // Moved from interfaceConfig.TOOLBAR_ALWAYS_VISIBLE
|
||||
// // Whether toolbar should be always visible or should hide after x miliseconds.
|
||||
// alwaysVisible: false
|
||||
// alwaysVisible: false,
|
||||
// // Indicates whether the toolbar should still autohide when chat is open
|
||||
// autoHideWhileChatIsOpen: false
|
||||
// },
|
||||
|
||||
// Toolbar buttons which have their click/tap event exposed through the API on
|
||||
|
|
|
@ -74,7 +74,7 @@ export function fullScreenChanged(fullScreen: boolean) {
|
|||
export function hideToolbox(force: boolean = false): Function {
|
||||
return (dispatch: Dispatch<any>, getState: Function) => {
|
||||
const state = getState();
|
||||
const { toolbarConfig: { alwaysVisible } } = state['features/base/config'];
|
||||
const { toolbarConfig: { alwaysVisible, autoHideWhileChatIsOpen } } = state['features/base/config'];
|
||||
const { hovered } = state['features/toolbox'];
|
||||
const toolbarTimeout = getToolbarTimeout(state);
|
||||
|
||||
|
@ -89,7 +89,7 @@ export function hideToolbox(force: boolean = false): Function {
|
|||
if (!force
|
||||
&& (hovered
|
||||
|| state['features/invite'].calleeInfoVisible
|
||||
|| state['features/chat'].isOpen
|
||||
|| (state['features/chat'].isOpen && !autoHideWhileChatIsOpen)
|
||||
|| document.querySelector(focusSelector))) {
|
||||
dispatch(
|
||||
setToolboxTimeout(
|
||||
|
|
Loading…
Reference in New Issue