Skip to content

Commit 43da07c

Browse files
committed
优化版本对比机制
1 parent 1b22abc commit 43da07c

2 files changed

Lines changed: 5 additions & 3 deletions

File tree

src/main/utils/autoUpdate.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,7 @@ module.exports = isFirstCheckedUpdate => {
8888
})
8989
autoUpdater.on('update-not-available', info => {
9090
sendStatusToWindow('Update not available.')
91-
handleSendEvent({ type: 'update-not-available' })
91+
handleSendEvent({ type: 'update-not-available', info })
9292
})
9393
autoUpdater.on('error', err => {
9494
sendStatusToWindow('Error in auto-updater.')

src/renderer/App.vue

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -160,11 +160,13 @@ export default {
160160
this.showUpdateModal()
161161
})
162162
})
163-
rendererOn('update-not-available', () => {
163+
rendererOn('update-not-available', (e, info) => {
164164
this.clearUpdateTimeout()
165165
this.setNewVersion({
166-
version: this.version.version,
166+
version: info.version,
167+
desc: info.releaseNotes,
167168
})
169+
this.setVersionModalVisible({ isLatestVer: true })
168170
})
169171
// 更新超时定时器
170172
this.updateTimeout = setTimeout(() => {

0 commit comments

Comments
 (0)