Skip to content

Commit

Permalink
fix: checking if autostart is enabled
Browse files Browse the repository at this point in the history
  • Loading branch information
ailtonloures committed Sep 16, 2024
1 parent 7c54669 commit 9b43949
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 4 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"name": "vscode-bookmark",
"productName": "VSCode Bookmark",
"description": "A utility to save your favorite projects and open them easily in vscode.",
"version": "1.0.2",
"version": "1.0.3",
"author": "Ailton Loures",
"homepage": "https://github.com/ailtonloures/vscode-bookmark#readme",
"repository": {
Expand Down
9 changes: 6 additions & 3 deletions src/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,11 @@ Sentry.init({

if (squirrelStartup || !app.requestSingleInstanceLock()) app.quit();

app.setLoginItemSettings({
openAtLogin: true,
});
const { openAtLogin } = app.getLoginItemSettings();

if (openAtLogin === false)
app.setLoginItemSettings({
openAtLogin: true,
});

app.whenReady().then(() => renderTray());

0 comments on commit 9b43949

Please sign in to comment.