Procházet zdrojové kódy

fix: Fixes an exception when the chat button and shortcut are clicked.

master
Boris Grozev před 7 roky
rodič
revize
a3cb081609

+ 7
- 2
modules/UI/UI.js Zobrazit soubor

642
 };
642
 };
643
 
643
 
644
 /**
644
 /**
645
- * Indicates if the filmstrip is currently visible or not.
646
- * @returns {true} if the filmstrip is currently visible, otherwise
645
+ * Checks if the filmstrip is currently visible or not.
646
+ * @returns {true} if the filmstrip is currently visible, and false otherwise.
647
  */
647
  */
648
 UI.isFilmstripVisible = () => Filmstrip.isFilmstripVisible();
648
 UI.isFilmstripVisible = () => Filmstrip.isFilmstripVisible();
649
 
649
 
650
+/**
651
+ * @returns {true} if the chat panel is currently visible, and false otherwise.
652
+ */
653
+UI.isChatVisible = () => Chat.isVisible();
654
+
650
 /**
655
 /**
651
  * Toggles chat panel.
656
  * Toggles chat panel.
652
  */
657
  */

+ 2
- 2
react/features/toolbox/defaultToolbarButtons.web.js Zobrazit soubor

104
                 sendAnalytics(createToolbarEvent(
104
                 sendAnalytics(createToolbarEvent(
105
                     'toggle.chat',
105
                     'toggle.chat',
106
                     {
106
                     {
107
-                        enable: !APP.UI.Chat.isVisible()
107
+                        enable: !APP.UI.isChatVisible()
108
                     }));
108
                     }));
109
                 APP.UI.emitEvent(UIEvents.TOGGLE_CHAT);
109
                 APP.UI.emitEvent(UIEvents.TOGGLE_CHAT);
110
             },
110
             },
117
                 sendAnalytics(createShortcutEvent(
117
                 sendAnalytics(createShortcutEvent(
118
                     'toggle.chat',
118
                     'toggle.chat',
119
                     {
119
                     {
120
-                        enable: !APP.UI.Chat.isVisible()
120
+                        enable: !APP.UI.isChatVisible()
121
                     }));
121
                     }));
122
                 APP.UI.toggleChat();
122
                 APP.UI.toggleChat();
123
             },
123
             },

Načítá se…
Zrušit
Uložit