fix(autoStart): persist Start With System toggle on Windows (#1277)
Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Opus 4.8
parent
f96f325594
commit
198dfedd5f
@@ -73,7 +73,11 @@ function makeAutoStartLinuxPortal() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
const autoStartWindowsMac: AutoStart = {
|
const autoStartWindowsMac: AutoStart = {
|
||||||
isEnabled: () => app.getLoginItemSettings().openAtLogin,
|
isEnabled: () => {
|
||||||
|
const { openAtLogin, executableWillLaunchAtLogin } = app.getLoginItemSettings();
|
||||||
|
// Windows only reports openAtLogin as true when queried with the same args set in enable()
|
||||||
|
return openAtLogin || executableWillLaunchAtLogin;
|
||||||
|
},
|
||||||
enable: () =>
|
enable: () =>
|
||||||
app.setLoginItemSettings({
|
app.setLoginItemSettings({
|
||||||
openAtLogin: true,
|
openAtLogin: true,
|
||||||
|
|||||||
Reference in New Issue
Block a user