From ddb84f034e5d435769e5ba11afaa5b145871f4d9 Mon Sep 17 00:00:00 2001 From: Luke Barnard Date: Fri, 23 Jun 2017 17:52:50 +0100 Subject: [PATCH] Update tab-complete state onRoom received after joining As opposed to doing it when the component mounts. Fixes https://github.com/vector-im/riot-web/issues/3700 (hopefully) --- src/components/structures/RoomView.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/components/structures/RoomView.js b/src/components/structures/RoomView.js index da9778cd12..67b523bfaf 100644 --- a/src/components/structures/RoomView.js +++ b/src/components/structures/RoomView.js @@ -234,8 +234,6 @@ module.exports = React.createClass({ // making it impossible to indicate a newly joined room. const room = this.state.room; if (room) { - UserProvider.getInstance().setUserListFromRoom(room); - this.tabComplete.loadEntries(room); this.setState({ unsentMessageError: this._getUnsentMessageError(room), }); @@ -523,6 +521,8 @@ module.exports = React.createClass({ this._warnAboutEncryption(room); this._calculatePeekRules(room); this._updatePreviewUrlVisibility(room); + this.tabComplete.loadEntries(room); + UserProvider.getInstance().setUserListFromRoom(room); }, _warnAboutEncryption: function(room) {