From cebc2f5306fd20a9cde5fc9c66a5a4def71de65a Mon Sep 17 00:00:00 2001 From: David Baker Date: Wed, 3 Feb 2016 16:23:57 +0000 Subject: [PATCH] Put the room preview bar back for rooms that aren't peekable (since we always tried to peek, it would fail which would reject the promise and cause loadingTimeline to stay true forever). --- src/components/structures/RoomView.js | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/src/components/structures/RoomView.js b/src/components/structures/RoomView.js index 6dbff018ef..4373569fd4 100644 --- a/src/components/structures/RoomView.js +++ b/src/components/structures/RoomView.js @@ -163,10 +163,7 @@ module.exports = React.createClass({ console.log("Attempting to peek into room %s", this.props.roomId); - roomProm = MatrixClientPeg.get().peekInRoom(this.props.roomId).catch((err) => { - console.error("Failed to peek into room: %s", err); - throw err; - }).then((room) => { + roomProm = MatrixClientPeg.get().peekInRoom(this.props.roomId).then((room) => { this.setState({ room: room }); @@ -180,6 +177,11 @@ module.exports = React.createClass({ roomProm.then((room) => { this._calculatePeekRules(room); return this._initTimeline(this.props); + }).catch(() => { + // This is fine: the room just isn't peekable (we assume). + this.setState({ + timelineLoading: false, + }); }).done(); },