Skip to content

Commit

Permalink
Merge pull request #1340 from hovancik/fix/store-openatlogin
Browse files Browse the repository at this point in the history
Attemp to fix autostart at login
  • Loading branch information
hovancik authored Jul 28, 2023
2 parents 6efd584 + b29dd13 commit 25f0d91
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 1 deletion.
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,9 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/)
and this project adheres to [Semantic Versioning](http://semver.org/).

## [Unreleased]
### Fixed
- start at login for Windows Store version (not sure whether successfuly)

### Added
- both left and right click on tray opens menu (Windows)
- double click on tray opens Preferences (Windows)
Expand Down
9 changes: 8 additions & 1 deletion app/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -1386,7 +1386,14 @@ ipcMain.on('save-setting', function (event, key, value) {
}

if (key === 'openAtLogin') {
app.setLoginItemSettings({ openAtLogin: value })
if (process.platform === 'win32' && process.windowsStore) {
app.setLoginItemSettings({
openAtLogin: value,
path: 'start shell:appsFolder\\33881JanHovancik.stretchly_24fg4m0zq65je!Stretchly'
})
} else {
app.setLoginItemSettings({ openAtLogin: value })
}
} else {
settings.set(key, value)
}
Expand Down

0 comments on commit 25f0d91

Please sign in to comment.