Skip to content

Commit b0f2f34

Browse files
authored
feat: closing when all windows are closed (#59)
1 parent 803b5eb commit b0f2f34

File tree

1 file changed

+7
-3
lines changed

1 file changed

+7
-3
lines changed

src/main/index.ts

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,12 @@ const configFilePath = {
2121
actionsGroups: path.join(configFolder, 'actions-groups.json')
2222
}
2323

24-
const HAS_AUTO_UPDATE =
25-
!process.mas && !process.windowsStore && !process.env.SNAP && !process.env.FLATPAK_ID
24+
const IS_MAS = process.mas
25+
const IS_WINDOWS_STORE = process.windowsStore
26+
const IS_SNAP = process.env.SNAP
27+
const IS_FLATPAK_ID = process.env.FLATPAK_ID
28+
29+
const HAS_AUTO_UPDATE = !IS_MAS && !IS_WINDOWS_STORE && !IS_SNAP && !IS_FLATPAK_ID
2630

2731
fs.mkdirSync(configFolder, { recursive: true })
2832

@@ -113,7 +117,7 @@ app.whenReady().then(() => {
113117
// for applications and their menu bar to stay active until the user quits
114118
// explicitly with Cmd + Q.
115119
app.on('window-all-closed', () => {
116-
if (process.platform !== 'darwin') {
120+
if (process.platform !== 'darwin' && !IS_MAS) {
117121
app.quit()
118122
}
119123
})

0 commit comments

Comments
 (0)