mirror of
https://github.com/BoostIo/Boostnote
synced 2025-12-16 11:15:12 +00:00
fix wrong calling of updater
This commit is contained in:
49
main.js
49
main.js
@@ -247,41 +247,22 @@ app.on('ready', function () {
|
|||||||
Menu.setApplicationMenu(menu)
|
Menu.setApplicationMenu(menu)
|
||||||
}
|
}
|
||||||
|
|
||||||
if (process.platform === 'darwin') {
|
setInterval(function () {
|
||||||
setInterval(function () {
|
|
||||||
if (update == null) autoUpdater.checkForUpdates()
|
|
||||||
}, 1000 * 60 * 60 * 24)
|
|
||||||
|
|
||||||
ipc.on('check-update', function (event, msg) {
|
|
||||||
if (update == null) autoUpdater.checkForUpdates()
|
|
||||||
})
|
|
||||||
|
|
||||||
ipc.on('update-app', function (event, msg) {
|
|
||||||
if (update != null) {
|
|
||||||
appQuit = true
|
|
||||||
update()
|
|
||||||
}
|
|
||||||
})
|
|
||||||
|
|
||||||
autoUpdater.checkForUpdates()
|
|
||||||
} else if (process.platform === 'win32') {
|
|
||||||
setInterval(function () {
|
|
||||||
checkUpdate()
|
|
||||||
}, 1000 * 60 * 60 * 24)
|
|
||||||
|
|
||||||
ipc.on('check-update', function (event, msg) {
|
|
||||||
if (update == null) checkUpdate()
|
|
||||||
})
|
|
||||||
|
|
||||||
ipc.on('update-app', function (event, msg) {
|
|
||||||
if (isUpdateReady) {
|
|
||||||
appQuit = true
|
|
||||||
updater.install()
|
|
||||||
}
|
|
||||||
})
|
|
||||||
|
|
||||||
checkUpdate()
|
checkUpdate()
|
||||||
}
|
}, 1000 * 60 * 60 * 24)
|
||||||
|
|
||||||
|
ipc.on('check-update', function (event, msg) {
|
||||||
|
if (update == null) checkUpdate()
|
||||||
|
})
|
||||||
|
|
||||||
|
ipc.on('update-app', function (event, msg) {
|
||||||
|
if (isUpdateReady) {
|
||||||
|
appQuit = true
|
||||||
|
updater.install()
|
||||||
|
}
|
||||||
|
})
|
||||||
|
|
||||||
|
checkUpdate()
|
||||||
|
|
||||||
mainWindow = require('./atom-lib/main-window')
|
mainWindow = require('./atom-lib/main-window')
|
||||||
if (process.platform === 'win32') {
|
if (process.platform === 'win32') {
|
||||||
|
|||||||
Reference in New Issue
Block a user