Explorar el Código

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

master
Avram Tudor hace 3 años
padre
commit
faac45b5bc
No account linked to committer's email address
Se han modificado 2 ficheros con 5 adiciones y 3 borrados
  1. 3
    1
      config.js
  2. 2
    2
      react/features/toolbox/actions.web.js

+ 3
- 1
config.js Ver fichero

@@ -635,7 +635,9 @@ var config = {
635 635
     //     timeout: 4000,
636 636
     //     // Moved from interfaceConfig.TOOLBAR_ALWAYS_VISIBLE
637 637
     //     // Whether toolbar should be always visible or should hide after x miliseconds.
638
-    //     alwaysVisible: false
638
+    //     alwaysVisible: false,
639
+    //     // Indicates whether the toolbar should still autohide when chat is open
640
+    //     autoHideWhileChatIsOpen: false
639 641
     // },
640 642
 
641 643
     // Toolbar buttons which have their click/tap event exposed through the API on

+ 2
- 2
react/features/toolbox/actions.web.js Ver fichero

@@ -74,7 +74,7 @@ export function fullScreenChanged(fullScreen: boolean) {
74 74
 export function hideToolbox(force: boolean = false): Function {
75 75
     return (dispatch: Dispatch<any>, getState: Function) => {
76 76
         const state = getState();
77
-        const { toolbarConfig: { alwaysVisible } } = state['features/base/config'];
77
+        const { toolbarConfig: { alwaysVisible, autoHideWhileChatIsOpen } } = state['features/base/config'];
78 78
         const { hovered } = state['features/toolbox'];
79 79
         const toolbarTimeout = getToolbarTimeout(state);
80 80
 
@@ -89,7 +89,7 @@ export function hideToolbox(force: boolean = false): Function {
89 89
         if (!force
90 90
                 && (hovered
91 91
                     || state['features/invite'].calleeInfoVisible
92
-                    || state['features/chat'].isOpen
92
+                    || (state['features/chat'].isOpen && !autoHideWhileChatIsOpen)
93 93
                     || document.querySelector(focusSelector))) {
94 94
             dispatch(
95 95
                 setToolboxTimeout(

Loading…
Cancelar
Guardar