Disable the right panel when the app asks us to
Currently this is only used in the GroupView and for forwarding messages.
This commit is contained in:
parent
a24bbdffd0
commit
814c408e23
3 changed files with 10 additions and 14 deletions
|
@ -39,6 +39,8 @@ const GROUP_PHASES = Object.keys(RIGHT_PANEL_PHASES).filter(k => k.startsWith("G
|
|||
export default class RightPanelStore extends Store {
|
||||
static _instance;
|
||||
|
||||
_inhibitUpdates = false;
|
||||
|
||||
constructor() {
|
||||
super(dis);
|
||||
|
||||
|
@ -107,7 +109,12 @@ export default class RightPanelStore extends Store {
|
|||
}
|
||||
|
||||
__onDispatch(payload) {
|
||||
if (payload.action !== 'set_right_panel_phase') return;
|
||||
if (payload.action === 'panel_disable') {
|
||||
this._inhibitUpdates = payload.rightDisabled || payload.sideDisabled || false;
|
||||
return;
|
||||
}
|
||||
|
||||
if (payload.action !== 'set_right_panel_phase' || this._inhibitUpdates) return;
|
||||
|
||||
const targetPhase = payload.phase;
|
||||
if (!RIGHT_PANEL_PHASES[targetPhase]) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue