feat(toolbar) add flag for autohiding while chat open (#11104)

This commit is contained in:
Avram Tudor 2022-03-14 10:30:31 +02:00 committed by GitHub
parent 14ee7e247b
commit faac45b5bc
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 5 additions and 3 deletions

View File

@ -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

View File

@ -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(