diff --git a/src/renderer/coremods/transparency/index.ts b/src/renderer/coremods/transparency/index.ts index ef2405fd3..181f0953d 100644 --- a/src/renderer/coremods/transparency/index.ts +++ b/src/renderer/coremods/transparency/index.ts @@ -1,5 +1,11 @@ import { Logger } from "@replugged"; -import { generalSettings } from "../settings/pages/General"; +import { type GeneralSettings, defaultSettings } from "src/types"; +import * as settings from "../../apis/settings"; + +const generalSettings = await settings.init( + "dev.replugged.Settings", + defaultSettings, +); let observer: MutationObserver; @@ -17,7 +23,7 @@ function getRootStringProperty(property: string): string { const logger = Logger.coremod("Transparency"); -async function updateBackgroundMaterial(): Promise { +export async function updateBackgroundMaterial(): Promise { if (generalSettings.get("overrideWindowBackgroundMaterial")) return; const backgroundMaterial = getRootStringProperty("--window-background-material"); @@ -28,7 +34,7 @@ async function updateBackgroundMaterial(): Promise { } } -async function updateBackgroundColor(): Promise { +export async function updateBackgroundColor(): Promise { if (generalSettings.get("overrideWindowBackgroundColor")) return; const backgroundColor = getRootProperty("--window-background-color"); @@ -38,7 +44,7 @@ async function updateBackgroundColor(): Promise { } } -async function updateVibrancy(): Promise { +export async function updateVibrancy(): Promise { if (generalSettings.get("overrideWindowBackgroundMaterial")) return; const vibrancy = getRootStringProperty("--window-vibrancy");