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

feat: add option activateWithApp to allow not activate with this event #361

Merged
merged 2 commits into from
Oct 27, 2021

Conversation

linonetwo
Copy link
Contributor

This fixes #360

Copy link
Collaborator

@amaury1093 amaury1093 left a comment

Choose a reason for hiding this comment

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

LGTM, however I would like to see activateWithApp set to true by default.

}
});
if (this._options.activateWithApp) {
this.app.on('activate', (_event, hasVisibleWindows) => {
Copy link
Collaborator

Choose a reason for hiding this comment

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

I would like to not change the existing behavior.

Could you add inside the cleanOptions functions some logic to default this to true? E.g. if (options.activateWithApp === undefined) { options.activateWithApp = true }

@@ -8,6 +8,10 @@ import {
* Options for creating a menubar application
*/
export interface Options {
/**
* Listen on `app.on('activate')` to open menubar when app is activated.
Copy link
Collaborator

Choose a reason for hiding this comment

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

Suggested change
* Listen on `app.on('activate')` to open menubar when app is activated.
* Listen on `app.on('activate')` to open menubar when app is activated.
* @default `true`

@linonetwo
Copy link
Contributor Author

Updated as you suggested, thanks for the quick response, looks like I can use a new version today :)

Copy link
Collaborator

@amaury1093 amaury1093 left a comment

Choose a reason for hiding this comment

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

thanks!

@amaury1093 amaury1093 merged commit 8384bf2 into max-mapper:master Oct 27, 2021
@ktmouk ktmouk mentioned this pull request Nov 26, 2021
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.

Click on app icon will active both app and menubar app
2 participants