perf: ♻️ Optimization updater

This commit is contained in:
viarotel 2023-11-10 16:44:59 +08:00
parent bfdad9e8de
commit 61ccd4a469
2 changed files with 7 additions and 4 deletions

View File

@ -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检测到有更新就自动下载)

View File

@ -24,9 +24,6 @@ export const useDeviceStore = defineStore({
return this.config
},
setList(data) {
this.list = data
},
getLabel(device, param) {
if (!device) {
return ''
@ -54,6 +51,9 @@ export const useDeviceStore = defineStore({
return value
},
setList(data) {
this.list = data
},
async getList() {
const res = await window.adbkit.getDevices()