Don't peek when creating a room

This causes a race between receiving the room when starting to peek and receiving the room from joining it - https://github.com/vector-im/riot-web/issues/4330, https://github.com/matrix-org/riot-web-rageshakes/issues/196
This commit is contained in:
Luke Barnard 2017-06-16 18:24:07 +01:00
parent 739a120cf0
commit be58e1095e
3 changed files with 17 additions and 5 deletions

View file

@ -129,6 +129,8 @@ class RoomViewStore extends Store {
isInitialEventHighlighted: payload.highlighted,
roomLoading: false,
roomLoadError: null,
// should peek by default
shouldPeek: payload.should_peek === undefined ? true : payload.should_peek,
};
// If an event ID wasn't specified, default to the one saved for this room
@ -276,6 +278,10 @@ class RoomViewStore extends Store {
getJoinError() {
return this._state.joinError;
}
shouldPeek() {
return this._state.shouldPeek;
}
}
let singletonRoomViewStore = null;