fix file panel scroll position lost on room change
This commit is contained in:
parent
8cf6a8c311
commit
719165c67f
2 changed files with 52 additions and 1 deletions
|
@ -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) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue