refactor: Update excludedMenus condition to look at the end of the modeChain
This commit is contained in:
parent
dd0b6464d2
commit
5e2c05afe9
|
@ -106,7 +106,7 @@ export default class MenuUiHandler extends MessageUiHandler {
|
||||||
render() {
|
render() {
|
||||||
const ui = this.getUi();
|
const ui = this.getUi();
|
||||||
this.excludedMenus = () => [
|
this.excludedMenus = () => [
|
||||||
{ condition: ![Mode.COMMAND, Mode.TITLE].includes(ui.getModeChain()[0]), options: [MenuOptions.EGG_GACHA, MenuOptions.EGG_LIST] },
|
{ condition: ![Mode.COMMAND, Mode.TITLE].includes(ui.getModeChain().at(-1)!), options: [MenuOptions.EGG_GACHA, MenuOptions.EGG_LIST] },
|
||||||
{ condition: bypassLogin, options: [MenuOptions.LOG_OUT] }
|
{ condition: bypassLogin, options: [MenuOptions.LOG_OUT] }
|
||||||
];
|
];
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue