fix: restore wasOpenedAtLogin
functionality (#42411)
fix: restore opened at login functionality
This commit is contained in:
parent
c3b4cd987c
commit
91205540c4
4 changed files with 16 additions and 1 deletions
|
@ -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));
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue