refactor: Update excludedMenus condition to look at the end of the modeChain

This commit is contained in:
Frederico Santos 2024-08-31 03:33:07 +01:00
parent dd0b6464d2
commit 5e2c05afe9

View File

@ -106,7 +106,7 @@ export default class MenuUiHandler extends MessageUiHandler {
render() {
const ui = this.getUi();
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] }
];