fixed lag after installing a theme

This commit is contained in:
booploops 2022-06-13 17:48:55 -07:00
parent 99d509c96f
commit 365df407ab

View file

@ -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) => {