mirror of
https://github.com/electron/electron.git
synced 2026-04-10 03:01:51 -04:00
fix: restore wasOpenedAtLogin functionality (#42422)
fix: restore opened at login functionality Co-authored-by: trop[bot] <37223003+trop[bot]@users.noreply.github.com> Co-authored-by: Shelley Vohr <shelley.vohr@gmail.com>
This commit is contained in:
@@ -84,6 +84,14 @@ static NSDictionary* UNNotificationResponseToNSDictionary(
|
||||
}
|
||||
}
|
||||
|
||||
NSAppleEventDescriptor* event =
|
||||
NSAppleEventManager.sharedAppleEventManager.currentAppleEvent;
|
||||
BOOL launched_as_login_item =
|
||||
(event.eventID == kAEOpenApplication &&
|
||||
[event paramDescriptorForKeyword:keyAEPropData].enumCodeValue ==
|
||||
keyAELaunchedAsLogInItem);
|
||||
electron::Browser::Get()->SetLaunchedAtLogin(launched_as_login_item);
|
||||
|
||||
electron::Browser::Get()->DidFinishLaunching(
|
||||
electron::NSDictionaryToValue(notification_info));
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user