Skip to content

Commit

Permalink
fix: checking for updates twice one launch
Browse files Browse the repository at this point in the history
  • Loading branch information
aaronm-2112 committed Dec 4, 2023
1 parent 9cb2fa1 commit 1288c91
Showing 1 changed file with 8 additions and 5 deletions.
13 changes: 8 additions & 5 deletions src/main/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -467,6 +467,8 @@ const initialize = () => {
sendUserAnalytics();
makeSingleInstance();

log.info("Running initialize")

// This method will be called when Electron has finished
// initialization and is ready to create browser windows.
// Some APIs can only be used after this event occurs.
Expand Down Expand Up @@ -521,6 +523,7 @@ const initialize = () => {

// start_pre_flight_checks();
if (!buildIsBeta) {
log.info("Checking for updates in initialize");
autoUpdater.checkForUpdatesAndNotify();
}
updatechecked = true;
Expand Down Expand Up @@ -582,11 +585,11 @@ const initialize = () => {
shell.openExternal(url)
})

mainWindow.webContents.once("dom-ready", () => {
if (updatechecked == false && !buildIsBeta) {
autoUpdater.checkForUpdatesAndNotify();
}
})
// mainWindow.webContents.once("dom-ready", () => {
// if (updatechecked == false && !buildIsBeta) {
// autoUpdater.checkForUpdatesAndNotify();
// }
// })

mainWindow.on("close", async (e) => {
if (!user_restart_confirmed) {
Expand Down

0 comments on commit 1288c91

Please sign in to comment.