mirror of
https://gitcode.com/GitHub_Trending/ji/jitsi-meet.git
synced 2026-05-20 10:57:48 +00:00
feat refactors the chat flow so it has open and close functions
This commit is contained in:
@@ -5,8 +5,8 @@ import React, { Component } from 'react';
|
||||
import { translate } from '../../../base/i18n';
|
||||
import { IconMessage } from '../../../base/icons';
|
||||
import { connect } from '../../../base/redux';
|
||||
import { openChat } from '../../../chat/';
|
||||
import {
|
||||
_mapDispatchToProps,
|
||||
_mapStateToProps as _abstractMapStateToProps,
|
||||
type Props as AbstractProps
|
||||
} from '../../../chat/components/PrivateMessageButton';
|
||||
@@ -72,9 +72,9 @@ class PrivateMessageMenuButton extends Component<Props> {
|
||||
* @returns {void}
|
||||
*/
|
||||
_onClick() {
|
||||
const { _participant, _setPrivateMessageRecipient } = this.props;
|
||||
const { dispatch, _participant } = this.props;
|
||||
|
||||
_setPrivateMessageRecipient(_participant);
|
||||
dispatch(openChat(_participant));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -93,4 +93,4 @@ function _mapStateToProps(state: Object, ownProps: Props): $Shape<Props> {
|
||||
};
|
||||
}
|
||||
|
||||
export default translate(connect(_mapStateToProps, _mapDispatchToProps)(PrivateMessageMenuButton));
|
||||
export default translate(connect(_mapStateToProps)(PrivateMessageMenuButton));
|
||||
|
||||
Reference in New Issue
Block a user