onClose to return true to imply modal should close
This commit is contained in:
parent
4161e7bfe1
commit
63d4c2b84b
|
@ -21,6 +21,18 @@ import MessageRecipient from './MessageRecipient';
|
|||
* the mobile client.
|
||||
*/
|
||||
class Chat extends AbstractChat<Props> {
|
||||
|
||||
/**
|
||||
* Instantiates a new instance.
|
||||
*
|
||||
* @inheritdoc
|
||||
*/
|
||||
constructor(props: Props) {
|
||||
super(props);
|
||||
|
||||
this._onClose = this._onClose.bind(this);
|
||||
}
|
||||
|
||||
/**
|
||||
* Implements React's {@link Component#render()}.
|
||||
*
|
||||
|
@ -33,7 +45,7 @@ class Chat extends AbstractChat<Props> {
|
|||
headerLabelKey: 'chat.title'
|
||||
}}
|
||||
modalId = { CHAT_VIEW_MODAL_ID }
|
||||
onClose = { this.props._onToggleChat }>
|
||||
onClose = { this._onClose }>
|
||||
|
||||
<MessageContainer messages = { this.props._messages } />
|
||||
<MessageRecipient />
|
||||
|
@ -41,6 +53,19 @@ class Chat extends AbstractChat<Props> {
|
|||
</JitsiModal>
|
||||
);
|
||||
}
|
||||
|
||||
_onClose: () => boolean
|
||||
|
||||
/**
|
||||
* Closes the window.
|
||||
*
|
||||
* @returns {boolean}
|
||||
*/
|
||||
_onClose() {
|
||||
this.props._onToggleChat();
|
||||
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
export default translate(connect(_mapStateToProps, _mapDispatchToProps)(Chat));
|
||||
|
|
Loading…
Reference in New Issue