From d1acb0490b1446782a5b3b413af4345777dedb30 Mon Sep 17 00:00:00 2001 From: Vendicated Date: Mon, 10 Apr 2023 03:26:55 +0200 Subject: [PATCH] small fix --- src/renderer/settings.ts | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/src/renderer/settings.ts b/src/renderer/settings.ts index a60ba40..d6b1578 100644 --- a/src/renderer/settings.ts +++ b/src/renderer/settings.ts @@ -4,13 +4,11 @@ * Copyright (c) 2023 Vendicated and Vencord contributors */ -import type { Settings as TSettings } from "shared/settings"; import { SettingsStore } from "shared/utils/SettingsStore"; import { Common } from "./vencord"; -export const PlainSettings = VencordDesktopNative.settings.get() as TSettings; -export const Settings = new SettingsStore(PlainSettings); +export const Settings = new SettingsStore(VencordDesktopNative.settings.get()); Settings.addGlobalChangeListener((o, p) => VencordDesktopNative.settings.set(o, p)); export function useSettings() { @@ -25,9 +23,9 @@ export function useSettings() { return Settings.store; } -export function getValueAndOnChange(key: keyof TSettings) { +export function getValueAndOnChange(key: keyof typeof Settings.store) { return { - value: Settings[key] as any, - onChange: (value: any) => (Settings[key] = value) + value: Settings.store[key] as any, + onChange: (value: any) => (Settings.store[key] = value) }; }