Fix Bx button in Guide menu not working

This commit is contained in:
redphx 2024-12-12 06:46:41 +07:00
parent cb66340177
commit 4e736175b4
2 changed files with 2 additions and 2 deletions

View File

@ -41,7 +41,7 @@ export class GuideMenu {
style: ButtonStyle.FULL_WIDTH | ButtonStyle.FOCUSABLE | ButtonStyle.PRIMARY, style: ButtonStyle.FULL_WIDTH | ButtonStyle.FOCUSABLE | ButtonStyle.PRIMARY,
onClick: () => { onClick: () => {
// Wait until the Guide dialog is closed // Wait until the Guide dialog is closed
BxEventBus.Script.once('xcloudDialogDismissed', () => { BxEventBus.Script.once('dialog.dismissed', () => {
setTimeout(() => SettingsDialog.getInstance().show(), 50); setTimeout(() => SettingsDialog.getInstance().show(), 50);
}); });

View File

@ -78,7 +78,7 @@ export class BxEventBus<TEvents extends Record<string, any>> {
BX_FLAGS.Debug && BxLogger.warning('EventBus', 'on', event, callback); BX_FLAGS.Debug && BxLogger.warning('EventBus', 'on', event, callback);
} }
once<K extends keyof TEvents>(event: string, callback: EventCallback<TEvents[K]>): void { once<K extends keyof TEvents>(event: K, callback: EventCallback<TEvents[K]>): void {
const wrapper = (...args: any[]) => { const wrapper = (...args: any[]) => {
// @ts-ignore // @ts-ignore
callback(...args); callback(...args);