Skip to content

Jitsi Meet - Secure, Simple and Scalable Video Conferences that you use as a standalone app or embed in your web application.

onClose to return true to imply modal should close

tombrown8663d4c2b84be5
diff --git a/react/features/chat/components/native/Chat.js b/react/features/chat/components/native/Chat.js
index 5cdcc553cf..8fc103a8a0 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<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));