From d06d066050fa19adc1b8b2105b963a99f4ca9915 Mon Sep 17 00:00:00 2001 From: Richard Lewis Date: Wed, 28 Jun 2017 12:54:47 +0100 Subject: [PATCH] Move getInitialState to top of file. --- src/components/views/rooms/AppsDrawer.js | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/components/views/rooms/AppsDrawer.js b/src/components/views/rooms/AppsDrawer.js index ce414b2ea0..10e13eb623 100644 --- a/src/components/views/rooms/AppsDrawer.js +++ b/src/components/views/rooms/AppsDrawer.js @@ -33,6 +33,12 @@ module.exports = React.createClass({ room: React.PropTypes.object.isRequired, }, + getInitialState: function() { + return { + apps: this._getApps(), + }; + }, + componentWillMount: function() { ScalarMessaging.startListening(); MatrixClientPeg.get().on("RoomState.events", this.onRoomStateEvents); @@ -124,12 +130,6 @@ module.exports = React.createClass({ return app; }, - getInitialState: function() { - return { - apps: this._getApps(), - }; - }, - onRoomStateEvents: function(ev, state) { if (ev.getRoomId() !== this.props.room.roomId || ev.getType() !== 'im.vector.modular.widgets') { return;