From fa1e27076d6bbf42c80f575c182b4b80f4ab04a3 Mon Sep 17 00:00:00 2001 From: Bruno Windels Date: Tue, 18 Aug 2020 12:34:43 +0200 Subject: [PATCH] remove dupe method --- src/components/views/rooms/MessageComposer.js | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/src/components/views/rooms/MessageComposer.js b/src/components/views/rooms/MessageComposer.js index 22522c748e..9fe87cc98b 100644 --- a/src/components/views/rooms/MessageComposer.js +++ b/src/components/views/rooms/MessageComposer.js @@ -235,10 +235,6 @@ export default class MessageComposer extends React.Component { } }; - componentWillUnmount() { - dis.unregister(this.dispatcherRef); - } - componentDidMount() { this.dispatcherRef = dis.register(this.onAction); MatrixClientPeg.get().on("RoomState.events", this._onRoomStateEvents); @@ -269,6 +265,7 @@ export default class MessageComposer extends React.Component { if (this._roomStoreToken) { this._roomStoreToken.remove(); } + dis.unregister(this.dispatcherRef); } _onRoomStateEvents(ev, state) {