From 4ee57da6f3b516e57a9a39388f2390be1ac63bf9 Mon Sep 17 00:00:00 2001 From: Vendicated Date: Thu, 6 Feb 2025 03:47:34 +0100 Subject: [PATCH] remove legacy migration code --- src/renderer/fixes.ts | 13 +------------ src/renderer/index.ts | 18 ------------------ 2 files changed, 1 insertion(+), 30 deletions(-) diff --git a/src/renderer/fixes.ts b/src/renderer/fixes.ts index 2758b5c..90e7da5 100644 --- a/src/renderer/fixes.ts +++ b/src/renderer/fixes.ts @@ -6,7 +6,7 @@ import "./fixes.css"; -import { isWindows, localStorage } from "./utils"; +import { localStorage } from "./utils"; // Make clicking Notifications focus the window const originalSetOnClick = Object.getOwnPropertyDescriptor(Notification.prototype, "onclick")!.set!; @@ -22,14 +22,3 @@ Object.defineProperty(Notification.prototype, "onclick", { // Hide "Download Discord Desktop now!!!!" banner localStorage.setItem("hideNag", "true"); - -// FIXME: Remove eventually. -// Originally, Vencord always used a Windows user agent. This seems to cause captchas -// Now, we use a platform specific UA - HOWEVER, discord FOR SOME REASON????? caches -// device props in localStorage. This code fixes their cache to properly update the platform in SuperProps -if (!isWindows) - try { - const deviceProperties = localStorage.getItem("deviceProperties"); - if (deviceProperties && JSON.parse(deviceProperties).os === "Windows") - localStorage.removeItem("deviceProperties"); - } catch {} diff --git a/src/renderer/index.ts b/src/renderer/index.ts index 6e0459d..5659047 100644 --- a/src/renderer/index.ts +++ b/src/renderer/index.ts @@ -14,8 +14,6 @@ import "./arrpc"; console.log("read if cute :3"); export * as Components from "./components"; -import { onceReady } from "@vencord/types/webpack"; -import { Alerts } from "@vencord/types/webpack/common"; import SettingsUi from "./components/settings/Settings"; import { Settings } from "./settings"; @@ -31,19 +29,3 @@ customSettingsSections.push(() => ({ element: SettingsUi, className: "vc-vesktop-settings" })); - -// TODO: remove soon -const vencordDir = "vencordDir" as keyof typeof Settings.store; -if (Settings.store[vencordDir]) { - onceReady.then(() => - setTimeout( - () => - Alerts.show({ - title: "Custom Vencord Location", - body: "Due to security hardening changes in Vesktop, your custom Vencord location had to be reset. Please configure it again in the settings.", - onConfirm: () => delete Settings.store[vencordDir] - }), - 5000 - ) - ); -}