1
0
mirror of https://github.com/BoostIo/Boostnote synced 2025-12-13 09:46:22 +00:00

Fix update error

This error was caused by using super old version of
electron-winstaller.
This commit is contained in:
Junyoung Choi
2018-01-13 17:35:23 +09:00
parent 85937d8e23
commit 72d9e3e00b
3 changed files with 51 additions and 37 deletions

View File

@@ -65,14 +65,6 @@ updater.autoUpdater.on('error', (err) => {
console.log(err)
})
ipc.on('update-check', function (event, msg) {
if (isUpdateReady) {
mainWindow.webContents.send('update-ready', 'Update available!')
} else {
checkUpdate()
}
})
ipc.on('update-app-confirm', function (event, msg) {
if (isUpdateReady) {
mainWindow.removeAllListeners()
@@ -116,7 +108,18 @@ app.on('ready', function () {
checkUpdate()
}, 1000 * 60 * 60)
checkUpdate()
// Check update after 10 secs to prevent file locking of Windows
setTimeout(() => {
checkUpdate()
ipc.on('update-check', function (event, msg) {
if (isUpdateReady) {
mainWindow.webContents.send('update-ready', 'Update available!')
} else {
checkUpdate()
}
})
}, 10000)
ipcServer = require('./ipcServer')
ipcServer.server.start()
})