From 365df407ab66fda7194269ea2f3b528ae76a3531 Mon Sep 17 00:00:00 2001 From: booploops <49113086+booploops@users.noreply.github.com> Date: Mon, 13 Jun 2022 17:48:55 -0700 Subject: [PATCH] fixed lag after installing a theme --- src/main/base/browserwindow.ts | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/main/base/browserwindow.ts b/src/main/base/browserwindow.ts index 1b7d7811..e0d646d3 100644 --- a/src/main/base/browserwindow.ts +++ b/src/main/base/browserwindow.ts @@ -850,6 +850,7 @@ export class BrowserWindow { }) ipcMain.handle("get-github-plugin", async (event, url) => { + await this.StopWatcher() const returnVal = { success: true, theme: null, @@ -894,9 +895,11 @@ export class BrowserWindow { returnVal.success = false; } BrowserWindow.win.webContents.send("plugin-installed", returnVal); + this.StartWatcher(utils.getPath('themes')); }); ipcMain.handle("get-github-theme", async (event, url) => { + await this.StopWatcher() const returnVal = { success: true, theme: null, @@ -941,6 +944,8 @@ export class BrowserWindow { returnVal.success = false; } BrowserWindow.win.webContents.send("theme-installed", returnVal); + this.StartWatcher(utils.getPath('themes')); + BrowserWindow.win.webContents.send("theme-update", "") }); ipcMain.on("get-themes", (event, _key) => {