From 63d4c2b84be5536439e78a449d4d8e7b141b395b Mon Sep 17 00:00:00 2001 From: tombrown86 Date: Thu, 23 Jul 2020 12:56:45 +0100 Subject: [PATCH] onClose to return true to imply modal should close --- react/features/chat/components/native/Chat.js | 27 ++++++++++++++++++- 1 file changed, 26 insertions(+), 1 deletion(-) diff --git a/react/features/chat/components/native/Chat.js b/react/features/chat/components/native/Chat.js index 5cdcc553c..8fc103a8a 100644 --- a/react/features/chat/components/native/Chat.js +++ b/react/features/chat/components/native/Chat.js @@ -21,6 +21,18 @@ import MessageRecipient from './MessageRecipient'; * the mobile client. */ class Chat extends AbstractChat { + + /** + * 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 { headerLabelKey: 'chat.title' }} modalId = { CHAT_VIEW_MODAL_ID } - onClose = { this.props._onToggleChat }> + onClose = { this._onClose }> @@ -41,6 +53,19 @@ class Chat extends AbstractChat { ); } + + _onClose: () => boolean + + /** + * Closes the window. + * + * @returns {boolean} + */ + _onClose() { + this.props._onToggleChat(); + + return true; + } } export default translate(connect(_mapStateToProps, _mapDispatchToProps)(Chat));