rewrite settings api to use SettingsStore class (#2257)

Co-authored-by: Nuckyz <61953774+Nuckyz@users.noreply.github.com>
This commit is contained in:
V 2024-03-13 21:45:45 +01:00 committed by GitHub
parent 7190437e92
commit 9aa205b5ec
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
16 changed files with 336 additions and 180 deletions

View file

@ -19,7 +19,8 @@
import { app, protocol, session } from "electron";
import { join } from "path";
import { ensureSafePath, getSettings } from "./ipcMain";
import { ensureSafePath } from "./ipcMain";
import { RendererSettings } from "./settings";
import { IS_VANILLA, THEMES_DIR } from "./utils/constants";
import { installExt } from "./utils/extensions";
@ -55,7 +56,7 @@ if (IS_VESKTOP || !IS_VANILLA) {
});
try {
if (getSettings().enableReactDevtools)
if (RendererSettings.store.enableReactDevtools)
installExt("fmkadmapgofadopljbjfkapdkoienihi")
.then(() => console.info("[Vencord] Installed React Developer Tools"))
.catch(err => console.error("[Vencord] Failed to install React Developer Tools", err));