Fix cold open of the RightPanel directly to MemberInfo
This requires us to track some of the phase's state in the RightPanelStore, which is not great - trying to get it through the app is a bit difficult.
This commit is contained in:
parent
78ce801c25
commit
94ae06db4d
2 changed files with 19 additions and 5 deletions
|
@ -28,6 +28,9 @@ const INITIAL_STATE = {
|
|||
// The last phase (screen) the right panel was showing
|
||||
lastRoomPhase: SettingsStore.getValue("lastRightPanelPhaseForRoom"),
|
||||
lastGroupPhase: SettingsStore.getValue("lastRightPanelPhaseForGroup"),
|
||||
|
||||
// Extra information about the last phase
|
||||
lastRoomPhaseParams: {},
|
||||
};
|
||||
|
||||
const GROUP_PHASES = Object.keys(RIGHT_PANEL_PHASES).filter(k => k.startsWith("Group"));
|
||||
|
@ -72,6 +75,10 @@ export default class RightPanelStore extends Store {
|
|||
return this.isOpenForGroup ? this.groupPanelPhase : null;
|
||||
}
|
||||
|
||||
get roomPanelPhaseParams(): any {
|
||||
return this._state.lastRoomPhaseParams || {};
|
||||
}
|
||||
|
||||
_setState(newState) {
|
||||
this._state = Object.assign(this._state, newState);
|
||||
|
||||
|
@ -142,6 +149,7 @@ export default class RightPanelStore extends Store {
|
|||
this._setState({
|
||||
lastRoomPhase: targetPhase,
|
||||
showRoomPanel: true,
|
||||
lastRoomPhaseParams: payload.refireParams || {},
|
||||
});
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue