diff --git a/react/features/chat/actions.js b/react/features/chat/actions.any.js similarity index 83% rename from react/features/chat/actions.js rename to react/features/chat/actions.any.js index 99935c1db..0160ad783 100644 --- a/react/features/chat/actions.js +++ b/react/features/chat/actions.any.js @@ -1,13 +1,10 @@ // @flow -import VideoLayout from '../../../modules/UI/videolayout/VideoLayout'; - import { ADD_MESSAGE, CLEAR_MESSAGES, SEND_MESSAGE, - SET_PRIVATE_MESSAGE_RECIPIENT, - TOGGLE_CHAT + SET_PRIVATE_MESSAGE_RECIPIENT } from './actionTypes'; /** @@ -86,16 +83,3 @@ export function setPrivateMessageRecipient(participant: Object) { type: SET_PRIVATE_MESSAGE_RECIPIENT }; } - -/** - * Toggles display of the chat side panel while also taking window - * resize into account. - * - * @returns {Function} - */ -export function toggleChat() { - return function(dispatch: (Object) => Object) { - dispatch({ type: TOGGLE_CHAT }); - VideoLayout.onResize(); - }; -} diff --git a/react/features/chat/actions.native.js b/react/features/chat/actions.native.js new file mode 100644 index 000000000..247982d83 --- /dev/null +++ b/react/features/chat/actions.native.js @@ -0,0 +1,16 @@ +// @flow + +import { TOGGLE_CHAT } from './actionTypes'; + +export * from './actions.any'; + +/** + * Toggles display of the chat panel. + * + * @returns {Function} + */ +export function toggleChat() { + return function(dispatch: (Object) => Object) { + dispatch({ type: TOGGLE_CHAT }); + }; +} diff --git a/react/features/chat/actions.web.js b/react/features/chat/actions.web.js new file mode 100644 index 000000000..38c4f14a4 --- /dev/null +++ b/react/features/chat/actions.web.js @@ -0,0 +1,20 @@ +// @flow + +import VideoLayout from '../../../modules/UI/videolayout/VideoLayout'; + +import { TOGGLE_CHAT } from './actionTypes'; + +export * from './actions.any'; + +/** + * Toggles display of the chat side panel while also taking window + * resize into account. + * + * @returns {Function} + */ +export function toggleChat() { + return function(dispatch: (Object) => Object) { + dispatch({ type: TOGGLE_CHAT }); + VideoLayout.onResize(); + }; +}