From b60f6cb18d1d55d367ae2f3c322d76b709eacdfe Mon Sep 17 00:00:00 2001 From: Vendicated Date: Fri, 25 Nov 2022 18:07:29 +0100 Subject: WhoReacted: Make more reliable & don't spam api --- src/ipcMain/index.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/ipcMain/index.ts') diff --git a/src/ipcMain/index.ts b/src/ipcMain/index.ts index 8a60bc6..535c005 100644 --- a/src/ipcMain/index.ts +++ b/src/ipcMain/index.ts @@ -66,14 +66,14 @@ const settingsWriteQueue = new Queue(); ipcMain.handle(IpcEvents.GET_QUICK_CSS, () => readCss()); ipcMain.handle(IpcEvents.SET_QUICK_CSS, (_, css) => - cssWriteQueue.add(() => writeFile(QUICKCSS_PATH, css)) + cssWriteQueue.push(() => writeFile(QUICKCSS_PATH, css)) ); ipcMain.handle(IpcEvents.GET_SETTINGS_DIR, () => SETTINGS_DIR); ipcMain.on(IpcEvents.GET_SETTINGS, e => e.returnValue = readSettings()); ipcMain.handle(IpcEvents.SET_SETTINGS, (_, s) => { - settingsWriteQueue.add(() => writeFile(SETTINGS_FILE, s)); + settingsWriteQueue.push(() => writeFile(SETTINGS_FILE, s)); }); -- cgit