A full-featured download manager.
refactor: ipc change update menu state to command
Dr_rOot85a8430c3f7e
diff --git a/src/main/Application.js b/src/main/Application.jsindex 0989fd09..bbb8fe78 100644--- a/src/main/Application.js+++ b/src/main/Application.js@@ -373,6 +373,11 @@ export default class Application extends EventEmitter {})})+ this.on('application:change-menu-states', (visibleStates, enabledStates, checkedStates) => {+ this.menuManager.updateMenuStates(visibleStates, enabledStates, checkedStates)+ this.trayManager.updateMenuStates(visibleStates, enabledStates, checkedStates)+ })+this.on('application:open-file', (event) => {dialog.showOpenDialog({properties: ['openFile'],@@ -431,10 +436,6 @@ export default class Application extends EventEmitter {this.emit(command, ...args)})- ipcMain.on('update-menu-states', (event, visibleStates, enabledStates, checkedStates) => {- this.menuManager.updateMenuStates(visibleStates, enabledStates, checkedStates)- this.trayManager.updateMenuStates(visibleStates, enabledStates, checkedStates)- })ipcMain.on('download-status-change', (event, status) => {this.trayManager.updateStatus(status)diff --git a/src/renderer/components/Native/Ipc.vue b/src/renderer/components/Native/Ipc.vueindex 0ab1d7c8..b21c511d 100644--- a/src/renderer/components/Native/Ipc.vue+++ b/src/renderer/components/Native/Ipc.vue@@ -38,7 +38,7 @@visibleStates['task.new-bt-task'] = false}}- this.$electron.ipcRenderer.send('update-menu-states', visibleStates, null, null)+ this.$electron.ipcRenderer.send('command', 'application:change-menu-states', visibleStates, null, null)},destroyed: function () {this.unbindIpcEvents()