Browse Source

chat: fix crash on mobile

j8
Saúl Ibarra Corretgé 4 years ago
parent
commit
fde7cf4ab8

react/features/chat/actions.js → react/features/chat/actions.any.js View File

@@ -1,13 +1,10 @@
1 1
 // @flow
2 2
 
3
-import VideoLayout from '../../../modules/UI/videolayout/VideoLayout';
4
-
5 3
 import {
6 4
     ADD_MESSAGE,
7 5
     CLEAR_MESSAGES,
8 6
     SEND_MESSAGE,
9
-    SET_PRIVATE_MESSAGE_RECIPIENT,
10
-    TOGGLE_CHAT
7
+    SET_PRIVATE_MESSAGE_RECIPIENT
11 8
 } from './actionTypes';
12 9
 
13 10
 /**
@@ -86,16 +83,3 @@ export function setPrivateMessageRecipient(participant: Object) {
86 83
         type: SET_PRIVATE_MESSAGE_RECIPIENT
87 84
     };
88 85
 }
89
-
90
-/**
91
- * Toggles display of the chat side panel while also taking window
92
- * resize into account.
93
- *
94
- * @returns {Function}
95
- */
96
-export function toggleChat() {
97
-    return function(dispatch: (Object) => Object) {
98
-        dispatch({ type: TOGGLE_CHAT });
99
-        VideoLayout.onResize();
100
-    };
101
-}

+ 16
- 0
react/features/chat/actions.native.js View File

@@ -0,0 +1,16 @@
1
+// @flow
2
+
3
+import { TOGGLE_CHAT } from './actionTypes';
4
+
5
+export * from './actions.any';
6
+
7
+/**
8
+ * Toggles display of the chat panel.
9
+ *
10
+ * @returns {Function}
11
+ */
12
+export function toggleChat() {
13
+    return function(dispatch: (Object) => Object) {
14
+        dispatch({ type: TOGGLE_CHAT });
15
+    };
16
+}

+ 20
- 0
react/features/chat/actions.web.js View File

@@ -0,0 +1,20 @@
1
+// @flow
2
+
3
+import VideoLayout from '../../../modules/UI/videolayout/VideoLayout';
4
+
5
+import { TOGGLE_CHAT } from './actionTypes';
6
+
7
+export * from './actions.any';
8
+
9
+/**
10
+ * Toggles display of the chat side panel while also taking window
11
+ * resize into account.
12
+ *
13
+ * @returns {Function}
14
+ */
15
+export function toggleChat() {
16
+    return function(dispatch: (Object) => Object) {
17
+        dispatch({ type: TOGGLE_CHAT });
18
+        VideoLayout.onResize();
19
+    };
20
+}

Loading…
Cancel
Save