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).

This commit is contained in:
David Baker 2016-02-03 16:23:57 +00:00
parent 9468ff63ff
commit cebc2f5306

View file

@ -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();
},