fix file panel scroll position lost on room change

This commit is contained in:
thobyv-kismat 2020-04-11 04:03:32 +01:00
parent 8cf6a8c311
commit 719165c67f
2 changed files with 52 additions and 1 deletions

View file

@ -33,6 +33,7 @@ class RoomScrollStateStore {
// pixelOffset: the number of pixels the window is scrolled down
// from the focussedEvent.
this._RoomViewScrollStateMap = {};
this._FilePanelScrollStateMap = {};
}
getRoomViewScrollState(roomId) {
@ -42,6 +43,14 @@ class RoomScrollStateStore {
setRoomViewScrollState(roomId, scrollState) {
this._RoomViewScrollStateMap[roomId] = scrollState;
}
getFilePanelScrollState(roomId, scrollState) {
return this._FilePanelScrollStateMap[roomId];
}
setFilePanelScrollState(roomId, scrollState) {
this._FilePanelScrollStateMap[roomId] = scrollState;
}
}
if (global.mx_RoomScrollStateStore === undefined) {