diff options
author | Vendicated <vendicated@riseup.net> | 2022-11-25 18:07:29 +0100 |
---|---|---|
committer | Vendicated <vendicated@riseup.net> | 2022-11-25 18:07:29 +0100 |
commit | b60f6cb18d1d55d367ae2f3c322d76b709eacdfe (patch) | |
tree | c2d06ff7643da8244c157c03e877b273b5b61a39 /src/ipcMain/index.ts | |
parent | bb398970ef7d60c68191f5e6e153bdba24e07207 (diff) | |
download | Vencord-b60f6cb18d1d55d367ae2f3c322d76b709eacdfe.tar.gz Vencord-b60f6cb18d1d55d367ae2f3c322d76b709eacdfe.tar.bz2 Vencord-b60f6cb18d1d55d367ae2f3c322d76b709eacdfe.zip |
WhoReacted: Make more reliable & don't spam api
Diffstat (limited to 'src/ipcMain/index.ts')
-rw-r--r-- | src/ipcMain/index.ts | 4 |
1 files changed, 2 insertions, 2 deletions
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)); }); |