Skip to content
This repository was archived by the owner on Sep 11, 2024. It is now read-only.

Commit af6392d

Browse files
committed
Fix URL previews
and also things like the unsent message error and encryption warning. Stuff that we need to do at room view mount time had got moved into a clause of the if statement in onHaveRoom and so wasn't being executed. Fixes element-hq/element-web#4327
1 parent 1f48b4c commit af6392d

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/components/structures/RoomView.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -230,6 +230,10 @@ module.exports = React.createClass({
230230
if (room) {
231231
this._updateAutoComplete(room);
232232
this.tabComplete.loadEntries(room);
233+
this.setState({
234+
unsentMessageError: this._getUnsentMessageError(room),
235+
});
236+
this._onRoomLoaded(room);
233237
}
234238
if (!this.state.joining && this.state.roomId) {
235239
if (this.props.autoJoin) {
@@ -262,10 +266,6 @@ module.exports = React.createClass({
262266
} else if (room) {
263267
// Stop peeking because we have joined this room previously
264268
MatrixClientPeg.get().stopPeeking();
265-
this.setState({
266-
unsentMessageError: this._getUnsentMessageError(room),
267-
});
268-
this._onRoomLoaded(room);
269269
}
270270
},
271271

0 commit comments

Comments
 (0)