Skip to content

Commit

Permalink
perf: ♻️ Optimization updater
Browse files Browse the repository at this point in the history
  • Loading branch information
viarotel committed Nov 10, 2023
1 parent bfdad9e commit 61ccd4a
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 4 deletions.
5 changes: 4 additions & 1 deletion electron/events/updater/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,10 @@ export default (mainWindow) => {
// 安装更新
ipcMain.on('quit-and-install', () => {
console.log('ipcMain:quit-and-install')
setImmediate(() => autoUpdater.quitAndInstall())
setImmediate(() => {
app.isQuiting = true
autoUpdater.quitAndInstall()
})
})

// 设置自动下载为false(默认为true,检测到有更新就自动下载)
Expand Down
6 changes: 3 additions & 3 deletions src/store/device/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,6 @@ export const useDeviceStore = defineStore({

return this.config
},
setList(data) {
this.list = data
},
getLabel(device, param) {
if (!device) {
return ''
Expand Down Expand Up @@ -54,6 +51,9 @@ export const useDeviceStore = defineStore({

return value
},
setList(data) {
this.list = data
},
async getList() {
const res = await window.adbkit.getDevices()

Expand Down

0 comments on commit 61ccd4a

Please sign in to comment.