Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

updateMenu should be public #243

Open
Christilut opened this issue Oct 5, 2023 · 1 comment
Open

updateMenu should be public #243

Christilut opened this issue Oct 5, 2023 · 1 comment

Comments

@Christilut
Copy link

This method is marked private:

private updateMenu(menu?: Menu) { }

But if you update the menu with wth Menu.setApplicationMenu(menu) then the commandId's have changed but this package does not know about the new commandId's. The result is that clicking any menu item does not work since they refer to non-existing commandId's.

If I run titlebar.updateMenu(menu) after setApplicationMenu, the commandIds are also updated and clicks work as expected.

@AlexTorresDev
Copy link
Owner

You should use refreshMenu, an asynchronous method that refreshes the menu with what is in Menu.getApplicationMenu().

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants