Selaa lähdekoodia

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

master
Avram Tudor 3 vuotta sitten
vanhempi
commit
faac45b5bc
No account linked to committer's email address
2 muutettua tiedostoa jossa 5 lisäystä ja 3 poistoa
  1. 3
    1
      config.js
  2. 2
    2
      react/features/toolbox/actions.web.js

+ 3
- 1
config.js Näytä tiedosto

635
     //     timeout: 4000,
635
     //     timeout: 4000,
636
     //     // Moved from interfaceConfig.TOOLBAR_ALWAYS_VISIBLE
636
     //     // Moved from interfaceConfig.TOOLBAR_ALWAYS_VISIBLE
637
     //     // Whether toolbar should be always visible or should hide after x miliseconds.
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
     // Toolbar buttons which have their click/tap event exposed through the API on
643
     // Toolbar buttons which have their click/tap event exposed through the API on

+ 2
- 2
react/features/toolbox/actions.web.js Näytä tiedosto

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

Loading…
Peruuta
Tallenna