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

Send notification info to app.ready, on macOS #7053

Merged
merged 5 commits into from Sep 9, 2016

Conversation

Projects
None yet
5 participants
@CharlieHess
Contributor

CharlieHess commented Sep 1, 2016

This PR is an attempt to address electron-archive/brightray#168. Rather than clear out all notifications, we'll check for the NSApplicationLaunchUserNotificationKey and if found, send any notification arguments stashed in userInfo to the app.ready event. For Windows & Linux, this will always be an empty dictionary.

Send notification userInfo to app.ready, on macOS.
Check if the user launched the app from a notification and send the notification args across if so.

CharlieHess added some commits Sep 1, 2016

@paulcbetts

This comment has been minimized.

Contributor

paulcbetts commented Sep 2, 2016

#blessed

@felixrieseberg

This comment has been minimized.

Member

felixrieseberg commented Sep 8, 2016

@zcbenz Let me know if there's anything I can do to get this over the 🏁 line

@@ -156,7 +156,8 @@ void AtomBrowserMainParts::PreMainMessageLoopRun() {
#if !defined(OS_MACOSX)
// The corresponding call in macOS is in AtomApplicationDelegate.
Browser::Get()->WillFinishLaunching();
Browser::Get()->DidFinishLaunching();
base::DictionaryValue* empty_info = new base::DictionaryValue();

This comment has been minimized.

@kevinsawicki

kevinsawicki Sep 8, 2016

Contributor

Will this be leaked since it is never freed and isn't wrapped in a smart pointer?

@zcbenz

This comment has been minimized.

Contributor

zcbenz commented Sep 9, 2016

👍

@zcbenz zcbenz merged commit b6079ff into master Sep 9, 2016

6 checks passed

continuous-integration/appveyor/pr AppVeyor build succeeded
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details
electron-mas-x64 Build #2336 succeeded in 7 min 12 sec
Details
electron-osx-x64 Build #2344 succeeded in 7 min 29 sec
Details
electron-win-ia32 Build #1408 succeeded in 6 min 20 sec
Details
electron-win-x64 Build #1386 succeeded in 6 min 10 sec
Details

@zcbenz zcbenz deleted the launch-from-notification branch Sep 9, 2016

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment