Skip to content

Commit cafd92d

Browse files
authored
Merge pull request #31 from Spatchy/bug/winsert-uninstall-ignores-cancel
Fix Winsert uninstaller ignores cancel
2 parents 163addb + 72668ad commit cafd92d

File tree

1 file changed

+7
-4
lines changed

1 file changed

+7
-4
lines changed

winsertInstaller/uninstallWinsert.js

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,15 @@
11
const { dialog } = require("electron")
22
const fs = require("fs")
33

4-
const uninstallWinsert = async (userData, winsertId, displayName) => {
5-
const dialogResult = await dialog.showMessageBox({
4+
const uninstallWinsert = (userData, winsertId, displayName) => {
5+
const dialogResult = dialog.showMessageBoxSync({
66
type: "warning",
77
title: "Uninstall",
88
message: `Are you sure you want to permanently uninstall ${displayName}?`,
9-
buttons: ["Uninstall", "Cancel"],
9+
buttons: [
10+
"Cancel",
11+
"Uninstall"
12+
],
1013
defaultId: 1,
1114
noLink: true
1215
})
@@ -21,7 +24,7 @@ const uninstallWinsert = async (userData, winsertId, displayName) => {
2124
{ recursive: true, force: true }
2225
)
2326

24-
await dialog.showMessageBox({
27+
dialog.showMessageBoxSync({
2528
type: "info",
2629
title: "Uninstall",
2730
message: `${displayName} was uninstalled successfully`,

0 commit comments

Comments
 (0)