Skip to content

Commit

Permalink
don't bug user with update error notifications.
Browse files Browse the repository at this point in the history
  • Loading branch information
dehmer committed Jun 19, 2024
1 parent 805f98b commit 46b2bc1
Showing 1 changed file with 3 additions and 6 deletions.
9 changes: 3 additions & 6 deletions src/main/SelfUpdate.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/* eslint-disable quotes */
import { autoUpdater } from 'electron-updater'
import { app, dialog, Notification } from 'electron'
import { app, dialog } from 'electron'

const DELAY_CHECK_AFTER_APP_READY = 30000

Expand Down Expand Up @@ -40,7 +40,7 @@ SelfUpdate.prototype.checkForUpdates = function () {
type: 'info',
message: `
A new version of ODINv2 is ready to install!
Do you want to install version ${updateInfo.version} now?`,
buttons: ['Install now!', 'Not now!'],
cancelId: 1
Expand All @@ -53,10 +53,7 @@ SelfUpdate.prototype.checkForUpdates = function () {
})

autoUpdater.on('error', (error) => {
(new Notification({
title: 'Update error',
body: error.message
})).show()
console.log(`[SelfUpdate] ${error.message}`)
})

setTimeout(() => autoUpdater.checkForUpdates(), DELAY_CHECK_AFTER_APP_READY)
Expand Down

0 comments on commit 46b2bc1

Please sign in to comment.