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,
|
// timeout: 4000,
|
||||||
// // Moved from interfaceConfig.TOOLBAR_ALWAYS_VISIBLE
|
// // Moved from interfaceConfig.TOOLBAR_ALWAYS_VISIBLE
|
||||||
// // Whether toolbar should be always visible or should hide after x miliseconds.
|
// // 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
|
// 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 {
|
export function hideToolbox(force: boolean = false): Function {
|
||||||
return (dispatch: Dispatch<any>, getState: Function) => {
|
return (dispatch: Dispatch<any>, getState: Function) => {
|
||||||
const state = getState();
|
const state = getState();
|
||||||
const { toolbarConfig: { alwaysVisible } } = state['features/base/config'];
|
const { toolbarConfig: { alwaysVisible, autoHideWhileChatIsOpen } } = state['features/base/config'];
|
||||||
const { hovered } = state['features/toolbox'];
|
const { hovered } = state['features/toolbox'];
|
||||||
const toolbarTimeout = getToolbarTimeout(state);
|
const toolbarTimeout = getToolbarTimeout(state);
|
||||||
|
|
||||||
|
@ -89,7 +89,7 @@ export function hideToolbox(force: boolean = false): Function {
|
||||||
if (!force
|
if (!force
|
||||||
&& (hovered
|
&& (hovered
|
||||||
|| state['features/invite'].calleeInfoVisible
|
|| state['features/invite'].calleeInfoVisible
|
||||||
|| state['features/chat'].isOpen
|
|| (state['features/chat'].isOpen && !autoHideWhileChatIsOpen)
|
||||||
|| document.querySelector(focusSelector))) {
|
|| document.querySelector(focusSelector))) {
|
||||||
dispatch(
|
dispatch(
|
||||||
setToolboxTimeout(
|
setToolboxTimeout(
|
||||||
|
|
Loading…
Reference in New Issue