Skip to content
This repository was archived by the owner on Apr 3, 2026. It is now read-only.

Commit a11a539

Browse files
committed
Fixed closing app not always closing all threads
1 parent 555ba66 commit a11a539

5 files changed

Lines changed: 5 additions & 9 deletions

File tree

app/cancel.js

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,6 @@ $(() => {
2727
}
2828

2929
function onCloseButtonPress() {
30-
app.quit();
3130
win.close();
3231
}
3332

@@ -45,9 +44,7 @@ $(() => {
4544
}
4645

4746
function onCancelButtonPress() {
48-
app.quit();
4947
win.close();
50-
5148
}
5249

5350
function onCancelAndRemoveButtonPress() {
@@ -58,7 +55,6 @@ $(() => {
5855
console.log(err)
5956
}
6057
fs.unlinkSync(configPath);
61-
app.quit();
6258
win.close();
6359
}
6460

app/download.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,6 @@ $(() => {
8989
}
9090

9191
function onCloseButtonPress() {
92-
app.quit();
9392
win.close();
9493
}
9594

app/folder_select.js

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -66,9 +66,7 @@ $(() => {
6666
}
6767

6868
function onCloseButtonPress() {
69-
app.quit();
7069
win.close();
71-
7270
}
7371

7472
function onContinueButtonPress() {

app/main.js

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,11 @@ function createWindow() {
4343

4444
}
4545

46+
// Quit when all windows are closed.
47+
app.on('window-all-closed', function() {
48+
app.quit();
49+
})
50+
4651
app.setAppUserModelId("PRBF2-Download-Assistant");
4752
app.on('ready', createWindow);
4853

app/remove.js

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,6 @@ $(() => {
2727
}
2828

2929
function onCloseButtonPress() {
30-
app.quit();
3130
win.close();
3231
}
3332

@@ -52,7 +51,6 @@ $(() => {
5251
console.log(err)
5352
}
5453
fs.unlinkSync(configPath);
55-
app.quit();
5654
win.close();
5755
}
5856

0 commit comments

Comments
 (0)