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

fix(tray): 🔧 Fix setter for tray-menu #2594

Merged
merged 4 commits into from Aug 22, 2023
Merged

fix(tray): 🔧 Fix setter for tray-menu #2594

merged 4 commits into from Aug 22, 2023

Conversation

whizzzkid
Copy link
Contributor

fixes: #2591

Signed-off-by: Nishant Arora <1895906+whizzzkid@users.noreply.github.com>
@whizzzkid whizzzkid requested review from SgtPooki and a team as code owners August 22, 2023 21:52
Signed-off-by: Nishant Arora <1895906+whizzzkid@users.noreply.github.com>
@@ -32,6 +32,10 @@ function buildCheckbox (key, label) {
// they natively work as soon as the menu opens. They don't work like that on Windows
// or other OSes and must be registered globally. They still collide with global
// accelerator. Please see ../utils/setup-global-shortcut.js for more info.
/**
*
* @returns {Promise<Omit<Electron.Menu, 'getMenuItemById'> & {getMenuItemById: (id: string) => Electron.MenuItem}>}
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this ugly type is only to satisfy the method calls downstream which want getMenuItemById to not return null

Signed-off-by: Nishant Arora <1895906+whizzzkid@users.noreply.github.com>
Signed-off-by: Nishant Arora <1895906+whizzzkid@users.noreply.github.com>
@whizzzkid whizzzkid merged commit 7d680e3 into main Aug 22, 2023
7 checks passed
@whizzzkid whizzzkid deleted the fix/set-tray-menu branch August 22, 2023 23:26
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

Successfully merging this pull request may close these issues.

[gui error report] Error: [ctx] Property tray-menu already exists
2 participants