优化版本对比机制
parent
1b22abcd50
commit
43da07ca4c
|
@ -88,7 +88,7 @@ module.exports = isFirstCheckedUpdate => {
|
||||||
})
|
})
|
||||||
autoUpdater.on('update-not-available', info => {
|
autoUpdater.on('update-not-available', info => {
|
||||||
sendStatusToWindow('Update not available.')
|
sendStatusToWindow('Update not available.')
|
||||||
handleSendEvent({ type: 'update-not-available' })
|
handleSendEvent({ type: 'update-not-available', info })
|
||||||
})
|
})
|
||||||
autoUpdater.on('error', err => {
|
autoUpdater.on('error', err => {
|
||||||
sendStatusToWindow('Error in auto-updater.')
|
sendStatusToWindow('Error in auto-updater.')
|
||||||
|
|
|
@ -160,11 +160,13 @@ export default {
|
||||||
this.showUpdateModal()
|
this.showUpdateModal()
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
rendererOn('update-not-available', () => {
|
rendererOn('update-not-available', (e, info) => {
|
||||||
this.clearUpdateTimeout()
|
this.clearUpdateTimeout()
|
||||||
this.setNewVersion({
|
this.setNewVersion({
|
||||||
version: this.version.version,
|
version: info.version,
|
||||||
|
desc: info.releaseNotes,
|
||||||
})
|
})
|
||||||
|
this.setVersionModalVisible({ isLatestVer: true })
|
||||||
})
|
})
|
||||||
// 更新超时定时器
|
// 更新超时定时器
|
||||||
this.updateTimeout = setTimeout(() => {
|
this.updateTimeout = setTimeout(() => {
|
||||||
|
|
Loading…
Reference in New Issue