chat: fix crash on mobile

This commit is contained in:
Saúl Ibarra Corretgé 2020-07-21 14:21:01 +02:00 committed by Saúl Ibarra Corretgé
parent 46b444c498
commit fde7cf4ab8
3 changed files with 37 additions and 17 deletions

View File

@ -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();
};
}

View File

@ -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 });
};
}

View File

@ -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();
};
}