fix file panel scroll position lost on room change
This commit is contained in:
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user