Revert "Fix Filepanel scroll position state lost when room is changed"

This commit is contained in:
Travis Ralston 2020-04-19 19:14:08 -06:00 committed by GitHub
parent c04a8d326e
commit 972baa881b
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 8 additions and 59 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.getRoomViewScrollState(newState.roomId);
const roomScrollState = RoomScrollStateStore.getScrollState(newState.roomId);
if (roomScrollState) {
newState.initialEventId = roomScrollState.focussedEvent;
newState.initialEventPixelOffset = roomScrollState.pixelOffset;
@ -466,7 +466,7 @@ export default createReactClass({
// update the scroll map before we get unmounted
if (this.state.roomId) {
RoomScrollStateStore.setRoomViewScrollState(this.state.roomId, this._getScrollState());
RoomScrollStateStore.setScrollState(this.state.roomId, this._getScrollState());
}
if (this.state.shouldPeek) {