Update docs for RVS

This commit is contained in:
Luke Barnard 2017-06-08 16:00:12 +01:00
parent 36f72cccb5
commit 1ff2be1896

View file

@ -23,9 +23,9 @@ import { _t } from '../languageHandler';
const INITIAL_STATE = { const INITIAL_STATE = {
// Whether we're joining the currently viewed room // Whether we're joining the currently viewed room
joining: false, joining: false,
// Any error occurred during joining // Any error that has occurred during joining
joinError: null, joinError: null,
// The room ID of the room // The room ID of the room currently being viewed
roomId: null, roomId: null,
// The event to scroll to initially // The event to scroll to initially
@ -229,38 +229,47 @@ class RoomViewStore extends Store {
this._state = Object.assign({}, INITIAL_STATE); this._state = Object.assign({}, INITIAL_STATE);
} }
// The room ID of the room currently being viewed
getRoomId() { getRoomId() {
return this._state.roomId; return this._state.roomId;
} }
// The event to scroll to initially
getInitialEventId() { getInitialEventId() {
return this._state.initialEventId; return this._state.initialEventId;
} }
// The offset to display the initial event at (see scrollStateMap)
getInitialEventPixelOffset() { getInitialEventPixelOffset() {
return this._state.initialEventPixelOffset; return this._state.initialEventPixelOffset;
} }
// Whether to highlight the initial event
isInitialEventHighlighted() { isInitialEventHighlighted() {
return this._state.isInitialEventHighlighted; return this._state.isInitialEventHighlighted;
} }
// The room alias of the room (or null if not originally specified in view_room)
getRoomAlias() { getRoomAlias() {
return this._state.roomAlias; return this._state.roomAlias;
} }
// Whether the current room is loading (true whilst resolving an alias)
isRoomLoading() { isRoomLoading() {
return this._state.roomLoading; return this._state.roomLoading;
} }
// Any error that has occurred during loading
getRoomLoadError() { getRoomLoadError() {
return this._state.roomLoadError; return this._state.roomLoadError;
} }
// Whether we're joining the currently viewed room
isJoining() { isJoining() {
return this._state.joining; return this._state.joining;
} }
// Any error that has occurred during joining
getJoinError() { getJoinError() {
return this._state.joinError; return this._state.joinError;
} }