✨ 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
|
// returns the config
|
||||||
ipcMain.on('config-request', (event, _arg) => {
|
ipcMain.handle('config-request', async function(event, _arg) {
|
||||||
event.returnValue = config
|
return config;
|
||||||
})
|
})
|
||||||
|
|
||||||
ipcMain.on('config-update', (event, data, target) => {
|
|
||||||
config = data // update in-memory config-file first
|
ipcMain.handle('config-update', function(event, data) {
|
||||||
cfg.update_config(data, target)
|
config = data;
|
||||||
|
cfg.update_file(data, data['path']);
|
||||||
})
|
})
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user