refactor RoomScrollStateStore to accomodate scrollmaps for file/notif panel

This commit is contained in:
thobyv-kismat 2020-04-11 02:59:26 +01:00
parent 2b6cbae4a7
commit 8cf6a8c311
2 changed files with 7 additions and 7 deletions

View file

@ -269,7 +269,7 @@ export default createReactClass({
// If an event ID wasn't specified, default to the one saved for this room
// in the scroll state store. Assume initialEventPixelOffset should be set.
if (!newState.initialEventId) {
const roomScrollState = RoomScrollStateStore.getScrollState(newState.roomId);
const roomScrollState = RoomScrollStateStore.getRoomViewScrollState(newState.roomId);
if (roomScrollState) {
newState.initialEventId = roomScrollState.focussedEvent;
newState.initialEventPixelOffset = roomScrollState.pixelOffset;
@ -470,7 +470,7 @@ export default createReactClass({
// update the scroll map before we get unmounted
if (this.state.roomId) {
RoomScrollStateStore.setScrollState(this.state.roomId, this._getScrollState());
RoomScrollStateStore.setRoomViewScrollState(this.state.roomId, this._getScrollState());
}
if (this.state.shouldPeek) {