✨ ipcMain now uses handle instead of .on for
❗ config-request probably doesn't need to be async like at all
This commit is contained in:
parent
ca68c61f3a
commit
7d3325fdc6
@ -51,12 +51,13 @@ app.on('activate', () => {
|
||||
});
|
||||
|
||||
// returns the config
|
||||
ipcMain.on('config-request', (event, _arg) => {
|
||||
event.returnValue = config
|
||||
ipcMain.handle('config-request', async function(event, _arg) {
|
||||
return config;
|
||||
})
|
||||
|
||||
ipcMain.on('config-update', (event, data, target) => {
|
||||
config = data // update in-memory config-file first
|
||||
cfg.update_config(data, target)
|
||||
|
||||
ipcMain.handle('config-update', function(event, data) {
|
||||
config = data;
|
||||
cfg.update_file(data, data['path']);
|
||||
})
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user