Skip to content

Commit

Permalink
fix: explicitly assign a value to cancelId for ‘Clear All Data' dia…
Browse files Browse the repository at this point in the history
…log (#1624)
  • Loading branch information
ericyzhu authored Nov 16, 2024
1 parent 9ec3fe5 commit fdb87cf
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion apps/main/src/lib/cleaner.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ import { promisify } from "node:util"
import { callWindowExpose } from "@follow/shared/bridge"
import { app, dialog } from "electron"

import { getIconPath } from "~/helper"
import { logger } from "~/logger"
import { getMainWindow } from "~/window"

Expand All @@ -23,9 +24,10 @@ export const clearAllDataAndConfirm = async () => {
// Dialog to confirm
const result = await dialog.showMessageBox({
type: "warning",

icon: getIconPath(),
message: t("dialog.clearAllData"),
buttons: [t("dialog.yes"), t("dialog.no")],
cancelId: 1,
})

if (result.response === 1) {
Expand Down

0 comments on commit fdb87cf

Please sign in to comment.