Ensure the right panel stays the same between room changes if possible

Fixes https://github.com/vector-im/riot-web/issues/10149
This commit is contained in:
Travis Ralston
2019-12-05 23:48:05 -07:00
parent bbdff701b4
commit 4873b526df
3 changed files with 26 additions and 16 deletions
+10
View File
@@ -29,3 +29,13 @@ export const RIGHT_PANEL_PHASES = Object.freeze({
GroupRoomInfo: 'GroupRoomInfo',
GroupMemberInfo: 'GroupMemberInfo',
});
// These are the phases that are safe to persist (the ones that don't require additional
// arguments).
export const RIGHT_PANEL_PHASES_NO_ARGS = [
RIGHT_PANEL_PHASES.NotificationPanel,
RIGHT_PANEL_PHASES.FilePanel,
RIGHT_PANEL_PHASES.RoomMemberList,
RIGHT_PANEL_PHASES.GroupMemberList,
RIGHT_PANEL_PHASES.GroupRoomList,
];