Skip to content

Commit

Permalink
fix: only perform reset app on reset button interaction (#1453)
Browse files Browse the repository at this point in the history
Signed-off-by: Adam Setch <adam.setch@outlook.com>
  • Loading branch information
setchy authored Aug 9, 2024
1 parent 333e0c9 commit 1800c04
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions src/electron/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -268,6 +268,7 @@ function takeScreenshot() {

function resetApp() {
const cancelButtonId = 0;
const resetButtonId = 1;

const response = dialog.showMessageBoxSync(mb.window, {
type: 'warning',
Expand All @@ -279,10 +280,8 @@ function resetApp() {
cancelId: cancelButtonId,
});

if (response === cancelButtonId) {
return;
if (response === resetButtonId) {
mb.window.webContents.send('gitify:reset-app');
mb.app.quit();
}

mb.window.webContents.send('gitify:reset-app');
mb.app.quit();
}

0 comments on commit 1800c04

Please sign in to comment.