Fixed: auto start setting

This commit is contained in:
Molunerfinn 2018-05-02 19:34:24 +08:00
parent 9fdd54ca16
commit 4a685e0474
2 changed files with 10 additions and 0 deletions

View File

@ -423,6 +423,12 @@ ipcMain.on('updteDefaultPicBed', (evt) => {
})
})
ipcMain.on('autoStart', (evt, val) => {
app.setLoginItemSettings({
openAtLogin: val
})
})
const shortKeyHash = {
upload: uploadClipboardFiles
}

View File

@ -211,7 +211,11 @@ export default {
},
handleAutoStartChange (val) {
this.$db.read().set('picBed.autoStart', val).write()
this.$electron.ipcRenderer.send('autoStart', val)
}
},
beforeDestroy () {
this.$electron.ipcRenderer.removeAllListeners('autoStart')
}
}
</script>