From 4a5f0838e217253174401bb5e523c234239fd748 Mon Sep 17 00:00:00 2001 From: Nuckyz <61953774+Nuckyz@users.noreply.github.com> Date: Sat, 7 Dec 2024 20:32:16 -0300 Subject: [PATCH] Remove workaround for Devtools theme --- src/main/patcher.ts | 15 +-------------- 1 file changed, 1 insertion(+), 14 deletions(-) diff --git a/src/main/patcher.ts b/src/main/patcher.ts index e858f3fc..e5b87290 100644 --- a/src/main/patcher.ts +++ b/src/main/patcher.ts @@ -17,7 +17,7 @@ */ import { onceDefined } from "@shared/onceDefined"; -import electron, { app, BrowserWindowConstructorOptions, Menu, nativeTheme } from "electron"; +import electron, { app, BrowserWindowConstructorOptions, Menu } from "electron"; import { dirname, join } from "path"; import { initIpc } from "./ipcMain"; @@ -100,19 +100,6 @@ if (!IS_VANILLA) { super(options); initIpc(this); - - // Workaround for https://github.com/electron/electron/issues/43367. Vesktop also has its own workaround - // @TODO: Remove this when the issue is fixed - if (IS_DISCORD_DESKTOP) { - this.webContents.on("devtools-opened", () => { - if (!nativeTheme.shouldUseDarkColors) return; - - nativeTheme.themeSource = "light"; - setTimeout(() => { - nativeTheme.themeSource = "dark"; - }, 100); - }); - } } else super(options); } }